SqlCancel Function | |
Requests cancellation of an executing SQL statement.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION SqlCancel(
nStatementHandle AS LONG
) AS LONG
public static int SqlCancel(
int nStatementHandle
)
Request Example
View SourceParameters
- nStatementHandle
- Type: Long
Specifies the active statement handle whose SQL statement is to be canceled.
Return Value
Type:
Long
Numeric.
SqlCancel( ) returns 1 if the SQL statement is successfully canceled, – 1 if there is a connection level error, and – 2 if there is an environment level error.
Remarks SqlCancel( ) cancels the execution of SqlColumns( ), SqlExec( ), SqlMoreResults( ), and SqlTables( ) in asynchronous mode.
To establish asynchronous mode, use the SqlSetProp( ) function.
Examples 1= SqlSetProp(gnHandle, 'asynchronous', .T.)
2= SqlExec(gnHandle, 'SELECT * FROM authors')
3= SqlCancel(gnHandle)
See Also