If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > calling stored procedures through asynchronous commands

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-18-03, 04:50
citizen.ron citizen.ron is offline
Registered User
 
Join Date: Jul 2003
Location: Frankfurt, Germany
Posts: 20
Question calling stored procedures through asynchronous commands

hi folks,

can somebody help me with the following problem:

i run an front end application as access xp project on a sql server 2000 database.

several stored procedures with different tasks are performing various operations on mass data (about 3 million records)
but not at the same time.
all of these procedures are entering records in a log table to notify the actual step or result.

i can of course view this log table in the database window, while the stored procedure is still running, to see what it is doing right now or next.

now i want to do the following:
i have a form, where the user shall select the stored procedure to be run
and after starting it the form shows the contents of the log table.
a timer updates this view every 10 seconds

BUT:
if i run the stored procedure synchronously, of course the application would be blocked.
so i thought, cool, letīs do it asynchronously, so i do something like:

cmd.Execute Options:=adAsyncExecute

i found, that long running stored procedures (talking about between 2 minutes to 24 hours !!) will need to have their timeout set because Access will stop them after the timeout (weird enough)
so i did

cmd.CommandTimeout = 10000
cmd.Execute Options:=adAsyncExecute

THE PROBLEM:
even running the command asynchronously my form will NOT UPDATE the table view i.e. not run through the timer event.
the code started the cmd.execute command and continued this routine, the application is not blocked, i tested that
still: no code is being run by access while the stored procedure is still running

somebody an idea?

ps:
i tried to run the command with the underlying access project connection as well as with a new adodb.connection object: same results, no difference
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On