SQLMoreResults()
This long-named function is used only in non-batch mode with SQL Pass-Through. It asks ODBC for the next set of results when you've sent a bunch of commands to the server at once.
Usage |
nResult = SQLMoreResults( nConnectionHandle [, cCursor ] ) |
Parameter |
Value |
Meaning |
nConnectionHandle |
Numeric |
The existing connection handle for the remote database being queried. |
cCursor |
Character |
The name of a cursor in which to put the query results. |
Omitted |
Use the name passed with the original SQLExec. If that was omitted, too, use "SQLResult". |
|
nResult |
0 |
The command is still executing. |
1 |
The current command has finished. |
|
2 |
All commands have finished. |
|
Negative |
An error occurred. |
Example |
* This example uses the ever-popular PUBS database nConn = SQLConnect("LocalServer") * Turn batch mode off SQLSetProp(nConn, "BatchMode",.F.) * Here the first Query returns SQLResult cursor of authors SQLEXEC(nConn, "select * from authors;" + ; " select * from publishers") * Now we direct the second result set to the named cursor ? SQLMoreResults(nConn, "rv_Publs") |
See Also |