DBDelete

Parent Previous Next

DBDelete

Function that deletes entries from the database.


Syntax:

Int Delete(string connString, string delString);
Delete entries in the database.

Int Delete(string provider, string connString, string delString);
Delete 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 delString: A String parameter containing the query to delete the entries in database.


Return:

Int: The number of rows affected.


Example:

In this example, the user will try to delete entries in the "Test" table that contain "value" equal to 1.

  


SVDBConnection.Delete("OleDB", "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Acces.accdb","DELETE FROM Test WHERE Valor=10;");