odbc_databaseExecuteSQL()

Synopsis

Executes an SQL command string.

Syntax

odbc_databaseExecuteSQL ( db_pointer As User, _
                          SQLstring As String, _
                          Optional ignoreErrors? As Boolean = False ) As Any 
Argument Type Description
db_pointer user Database reference. This reference should be obtained with the previous call to odbc_databaseOpen
SQLString string SQL expression
ignoreErrors? boolean Optional; if the argument is True , then database errors are not reported as Intent exceptions; default is False .

Example 1

Insert record into database

This example assumes that you have defined the PEFRESULTS data source
Dim db As User = odbc_databaseOpen( "ODBC;DSN=PEFRESULTS") 
odbc_databaseExecuteSQL(db, "Insert into Customer values ('Smith', 123)") 
odbc_databaseClose( db)