Executes the SQL command.
[Visual Basic]
Public Function Execute( _
ByVal sql As String, _
ByVal connectionControl As Boolean _
) As Boolean
[C#]
public bool Execute(
string sql,
bool connectionControl
);
Parameters
-
sql
- SQL.
-
connectionControl
- Value that indicates whether it controls the connection automatically.
Return Value
Returns true if successful; otherwise false.
Remarks
If connectionControl is true, first of all the connection to the database is opened and at last it is closed.
Example
How to execute the SQL command for adding a new row to the table of database.
dbData.Execute("Insert Into xxxtbl (xxx_id, xxx_name) Values ('00001', 'Asterworld')", True)
dbData.Execute("Insert Into xxxtbl (xxx_id, xxx_name) Values ('00001', 'Asterworld')", true);
See Also
AwDbData Class | Asterworld.Data Namespace