SQLEXEC( ) Function Example

The following example assumes SQLCONNECT( ) is successfully issued, and its return value is stored to a memory variable named gnConnHandle.

SQLEXEC( ) is used to execute a query that returns all the information in the authors table into a cursor named MyCursor.

= SQLSETPROP(gnConnHandle, 'asynchronous', .F.)
= SQLEXEC(gnConnHandle, 'SELECT * FROM authors', 'MyCursor')