by Mike G (7 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Thu 15th June 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Sometimes you have stored proc that takes 2,3 or 5 min to execute. Application that lock up frequently frustrates users and waste their time
Set cmd = New ADODB.Command
cmd.ActiveConnection = "DSN=test"
cmd.CommandTimeout = 180
cmd.CommandText = "sp_name"
cmd.CommandType = adCmdStoredProc
cmd.Execute , , adAsyncExecute'<--- start ASYNCHROUS
'You can also make a dumy progress bar to show proggres
Do While (cmd.State And adStateExecuting) = adStateExecuting
DoEvents
Loop
No comments have been posted about Sometimes you have stored proc that takes 2,3 or 5 min to execute. Application that lock up frequen. Why not be the first to post a comment about Sometimes you have stored proc that takes 2,3 or 5 min to execute. Application that lock up frequen.