ADO, adAsyncExecute

any one have example how to execute storedprosedur in ADO connection adAsyncExecute option ??
i need to give animasi to my from when waiting storedprosedure done.

Thanks.
whitelotusAsked:
Who is Participating?
 
sharmonConnect With a Mentor Commented:
You can show an animation or use a progress bar or whatever during the loop.
0
 
sharmonCommented:
Private Function Test()
  Dim objCmd As ADODB.Command
  Set objCmd = New ADODB.Command
 
  With objCmd
    .ActiveConnection = "DSN=YourDSN"
    .CommandTimeout = 180
    .CommandText = "YOUR_SP"
    .CommandType = adCmdStoredProc
    .Execute , , adAsyncExecute
  End With
 
  Do While (objCmd.State And adStateExecuting) = adStateExecuting
    DoEvents
  Loop
 
  Set objCmd = Nothing
End Function
0
 
sharmonCommented:
If it wasn't want you wanted, you didn't need to close the question, you should have responded with whatever you might have needed.

Shannon
0
 
irman_herdianaCommented:
am using that method, but it's seem make my application crash,  it happened when am add the skinframwork from codejock activex..does fall because the sync method or bug in codejock activex?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.