Difference between revisions of "SQLCANCEL()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Request that an executing SQL statement be cancelled | Request that an executing SQL statement be cancelled | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[CREATE CONNECTION]], [[SQLCOLUMNS()]], [[SQLCOMMIT()]], [[SQLCONNECT()]], [[SQLDISCONNECT()]], [[SQLEXEC()]], [[SQLGETPROP()]], [[SQLMORERESULTS()]], [[SQLPREPARE()]], [[SQLROLLBACK()]], [[SQLSETPROP()]], [[SQLSTRINGCONNECT()]], [[SQLTABLES()]] | + | [[CREATE CONNECTION]], [[SQLCOLUMNS()]], [[SQLCOMMIT()]], [[SQLCONNECT()]], [[SQLDISCONNECT()]], [[SQLERROR()]], [[SQLEXEC()]], [[SQLGETPROP()]], [[SQLMORERESULTS()]], [[SQLPREPARE()]], [[SQLROLLBACK()]], [[SQLSETPROP()]], [[SQLSTRINGCONNECT()]], [[SQLTABLES()]] |
Line 25: | Line 18: | ||
* SQLMORERESULTS() | * SQLMORERESULTS() | ||
* SQLTABLES() | * SQLTABLES() | ||
+ | |||
The SQLCANCEL() function operates on the data source specified by <nStatementHandle>. | The SQLCANCEL() function operates on the data source specified by <nStatementHandle>. | ||
Line 57: | Line 51: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | nStatHand=SQLSTRINGCONNECT("rec@rec1:user1/pass1/usr/recital/uas/data/southwind.tcpip",.T.) | + | nStatHand=SQLSTRINGCONNECT("rec@rec1:user1/pass1-/usr/recital/uas/data/southwind.tcpip",.T.) |
if nStatHand < 1 | if nStatHand < 1 | ||
dialog box [Could not connect] | dialog box [Could not connect] | ||
Line 66: | Line 60: | ||
endif | endif | ||
</code> | </code> | ||
− | |||
==Products== | ==Products== | ||
− | Recital | + | Recital, Recital Server |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
+ | [[Category:Remote Data Connectivity Functions]] |
Latest revision as of 16:14, 4 July 2011
Purpose
Request that an executing SQL statement be cancelled
Syntax
SQLCANCEL(<nStatementHandle>)
See Also
CREATE CONNECTION, SQLCOLUMNS(), SQLCOMMIT(), SQLCONNECT(), SQLDISCONNECT(), SQLERROR(), SQLEXEC(), SQLGETPROP(), SQLMORERESULTS(), SQLPREPARE(), SQLROLLBACK(), SQLSETPROP(), SQLSTRINGCONNECT(), SQLTABLES()
Description
The SQLCANCEL() function is used to request that an executing SQL statement be cancelled. It can be used to cancel any of the following functions when they are running in asynchronous mode:
- SQLCOLUMNS()
- SQLEXEC()
- SQLMORERESULTS()
- SQLTABLES()
The SQLCANCEL() function operates on the data source specified by <nStatementHandle>.
Keywords | Description |
---|---|
nStatementHandle | The workarea in which the gateway data source is open |
Return values:
Return Value | Description |
---|---|
1 | SQL statement was cancelled successfully |
–1 | Connection error |
–2 | Environment error |
The SQLCANCEL() function is included for compatibility only. Recital gateway functions do not operate in asynchronous mode.
Example
nStatHand=SQLSTRINGCONNECT("rec@rec1:user1/pass1-/usr/recital/uas/data/southwind.tcpip",.T.) if nStatHand < 1 dialog box [Could not connect] else SQLSETPROP(nStatHand, "Asynchronous", .T.) SQLEXEC(nStatHand, "SELECT * from example") SQLCANCEL(nStathand) endif
Products
Recital, Recital Server