Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLExec() in Asynch mode
Message
 
To
02/11/2000 13:46:56
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00437127
Message ID:
00437257
Views:
16
Hmmm, this is probably not the best way to get around this (hopefully someone with more experience can give you a better answer). But here is an idea. What about creating a bogus bogus table with say, one field. On this table you could put an insert trigger that holds the code that your stored procedure currenlty has. Change your stored procedure to simply insert a value into your bogus table and then return. This will cause the trigger to fire and run your code while at the same time returning control to your application. Just an idea...



>>You would have to run a DO WHILE loop until SQLEXEC returns a 0. For instance:
>>
>>
>>sqlret=0
>>DO WHILE sqlret = 0
>>     sqlret = SQLEXEC(nH,lcSQL)
>>ENDDO
>>
>>
>>This won't continue execution until the SP has completed but will keep the execution from stopping at the SQLEXEC command.
>
>Based on this premise, it looks like I have to evaluate the returned value; instead of just calling the function. So that I probably have a variable receive the value returned by SQLExec() as in:
nVar = SQLExec(nH,lcSQL)
as opposed to just
SQLExec(nH,lcSQL)
My code doesn't really care if the SP was successful or not, as long as I can kick it off and execute my next line of code. The SP runs for at least an hour and this will make the program looks like it hangs.
>
>Thanks.
>
>Ramil 11/2
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform