Visual FoxPro SQL Pass-Through Functions

The following table lists the Visual FoxPro SQL functions that support working with remote data sources, grouped according to task.

Task Function Purpose

Connection management


Connects to a data source for SQL pass-through operations.



Connects to a data source using ODBC connection string syntax.



Breaks a connection to an ODBC data source, making the specified connection handle obsolete.


Allows a SQL pass-through connection or connections to be temporarily disconnected.

SQL statement execution and control


Cancels an asynchronously executing SQL query on an active connection.



Executes a SQL pass-through query on an active connection; returns the number of result sets generated, or 0 if SQLEXEC( ) is still executing (asynchronous processing).



Puts another result set into a cursor. Returns 0 if the statement creating the result set is still executing.



Pre-compiles the SQL statement on the data source and binds the Visual FoxPro parameters, i.e. saves the actual parameter expressions for all the parameters in the SQL statement.



Requests a transaction commitment.



Requests a transaction rollback.

Data source information


Stores a list of column names and information about each to a cursor. Returns 1 if the function succeeds, or 0 if the function is still executing.



Stores the names of tables in the source into a cursor. Returns 1 if the function succeeds, or 0 if the function is still executing.

Miscellaneous control


Gets a connection property from an active connection.



Sets a property of an active connection.

The SQLEXEC( ), SQLMORERESULTS( ), SQLTABLES( ), and SQLCOLUMNS( ) statements can be canceled in synchronous mode by pressing ESC if SET ESCAPE is set to ON. You can cancel these statements at any time in asynchronous mode by issuing SQLCANCEL( ). All other SQL pass-through statements function synchronously and are not interruptible.

Expand imageSee Also

© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic