Community Scoring

Was this page helpful?

Tag Tags0

This page has no tags

Page statistics

838 views1 edit(s)3282 characters(s) Page last modified 18:15, 12 Apr 2012 by contentconnector
How to add your knowledge

odbc_databaseExecuteSQL()

    Table of contents
    1. 1. Synopsis
    2. 2. Syntax
    3. 3. Example 1

    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)