DBInsert
Function to insert entries to the database.
Syntax:
Int Insert(string
connString, string insString);
Insert entries in
the database.
Int Insert(string provider, string
connString, string insString);
Insert entries in
the database.
Params:
String provider: A
String parameter containing the provider name of the connection.
Exemple of providers: Odbc, OleDB, OracleClient or
SqlClient
String connString: A String parameter containing the name of the connection.
String insString: A String parameter containing the insert query.
Return:
Int: The number of rows affected.
Example:
In this example, the user will try to insert entries in the "Test" table that contain "value" equal to 1.
SVDBConnection.Insert("OleDB","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Acces.accdb", "INSERT INTO Test (value) VALUES (1)");
|