DELETE-SQL

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.


To the extent we've been able to test, it appears to work as advertised, except for the completely undocumented cCursor parameter. The cursor name is limited to 10 characters.

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

SQLConnect(), SQLExec(), SQLGetProp(), SQLSetProp()


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net