The following example assumes SQLCONNECT( ) is successfully issued, and its return value is stored to a memory variable named gnConnHandle
.
SQLEXEC( ) is used to sends a SQL statement to the data source and return the results to a cursor. SQLCANCEL( ) is issued to stop the query.
= SQLSETPROP(gnConnHandle, 'asynchronous', .T.) && To stop SQLEXEC( )
= SQLEXEC(gnConnHandle, 'SELECT * FROM authors')
= SQLCANCEL(gnConnHandle) && Wrong select statement, cancel