Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLExec without waiting for reply?

Status
Not open for further replies.

TomLeMes

MIS
Mar 19, 2004
96
0
0
GB
Hi everyone, sorry if this is a dense question, but I want to run a SQLExec command without having to wait for a reply - is there a way? The idea is that the SQLExec command would be deleting quite a large number of records which might take a minute or so - I don't want the user to have to wait for this, I'd like VFP to carry on processing the next lines of code. Is there a way to do this? I was looking at the SQLSetProp command, but am not really sure if I'm barking up the wrong tree.
 
Cool, thanks for that Baltman - I had a feeling it might be the asynchronous setting but was struggling to get a proper understanding of how it worked. Again, sorry if people feel that I'm wasting their time here - I just want to get clarification on how the asynchronous calls work. The help file says:
Visual FoxPro 9 Help said:
Until the function has finished processing, the application can use a connection handle only with the SQLCANCEL( ) Function or with the asynchronous functions — SQLEXEC( ), SQLMORERESULTS( ), SQLTABLES( ), or SQLCOLUMNS( ) — originally associated with the handle. You can't call any of the other three asynchronous functions or SQLDISCONNECT( ) with the same connection handle until the function has finished.
I don't find this passage particularly clear! Are they saying that, for instance, I can't be doing SQLEXEC Selects using a different handle until the original asynchronous handle has finished its work? I just want to set the lengthy delete procedure going using the Asynchronous call, but while that's happening, I want to be doing standard synchronous calls without making the user wait. In other words I want to set the delete off and then forget about it.


Or am I OK to continue with my selects as long as I use a different connection handle? Thanks for your help,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top