Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When SQLEXEC() returns a zero
Message
 
 
To
18/03/2008 18:54:36
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01303207
Message ID:
01303214
Views:
16
You'll not get 0 unless you set connection to Asynchronous. See SPT cursor fetching and progress displaying for SPT cursor downloading FAQ #8150, for example.
The SQLEXEC() will return multiple cursors when a stored procedure that returns multiple result sets is called or when you execute multiple select statements in one call to SQLEXEC().

>
>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!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform