Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Asynchronous queries? Distributed..

Author  Topic 

hartmanm
Starting Member

7 Posts

Posted - 2002-07-05 : 15:29:49
The query that's a thorn in my side at the moment owes much of it's speed problems to a remote query. The server that responds to the query is rather slow. Is there a way to create an asynchronous query? Sort of "do this query, but I don't need the results till later, execute the rest of my code in the mean time"?

Matt.


royv
Constraint Violating Yak Guru

455 Posts

Posted - 2002-07-05 : 15:32:09
What is the client that you are using to call the query?

*************************
Someone done told you wrong!
Go to Top of Page

hartmanm
Starting Member

7 Posts

Posted - 2002-07-05 : 15:55:15
This is on a PocketPC actually, but it's using CEFusion to access SQL Server 2000 directly over a WLAN.

Matt.


Go to Top of Page

royv
Constraint Violating Yak Guru

455 Posts

Posted - 2002-07-08 : 09:40:49
If I understand correctly, since your query runs slowly, you would like the query to be executing and then your PocketPC can do other things, correct? If so, then you will have to do this on the client-side. I'm not familiar with CEFusion, but CEFusion would have to be able to do this.

*************************
Someone done told you wrong!
Go to Top of Page

MakeYourDaddyProud

184 Posts

Posted - 2002-07-08 : 10:13:22
The best way to do this is to create a T-SQL job that contains the SQL on the executing server, and execute the job as soon as you require it on your pocket pc with sp_start_job. As soon as your pocket PC requires the data you will need to poll the 'execution_status' of the job via sp_help job. This may need to be in a loop with a retry timeout of some kind. The shell code for you pocket pc simply needs to use a Command object type to fire these sps. No problem!


sp_start_job (T-SQL)

Daniel Small MIAP
www.danielsmall.com IT Factoring
Go to Top of Page
   

- Advertisement -