Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When SQLEXEC() returns a zero
Message
From
18/03/2008 18:54:36
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
When SQLEXEC() returns a zero
Miscellaneous
Thread ID:
01303207
Message ID:
01303207
Views:
52
Hey Fox Gurus...

This is from the VFP doc on SQLEXEC():

Returns: Numeric data type.

SQLEXEC( ) returns the number of result sets if there is more than one. SQLEXEC( ) returns 0 if it is still executing and returns 1 when it has finished executing. SQLEXEC( ) returns –1 if a connection level error occurs.

Okay... so I know how to handle it if I get a 1 or a -1, but two things baffle me.

The most important is: what do I do if I get a zero returned. This means the connection is busy. I'm taking this as meaning I have a large result set that hasn't finished coming through, right? I have given this command:

ln_success = SQLEXEC(This.SQLConn, lcExe, lc_file)

In the above example, the "lcExe" is the call to the parameterized view and "lc_file" is the file name I want it returned into. Do I go into a loop waiting for the file to appear? Or is this telling me to abandon hope of getting a result set?

A last side question: the doc says SQLEXEC() "returns the number of result sets if there is more than one". Huh? How does one have more than one result set?

Thanks in advance for your time and experience!
-- John Kiernan
"Maybe Amelia Earhart was just stealing the plane".
Next
Reply
Map
View

Click here to load this message in the networking platform