Solved

ADO, adAsyncExecute

Posted on 2001-06-06
4
2,127 Views
Last Modified: 2013-11-23
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.
0
Comment
Question by:whitelotus
  • 3
4 Comments
 
LVL 6

Expert Comment

by:sharmon
Comment Utility
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
 
LVL 6

Accepted Solution

by:
sharmon earned 200 total points
Comment Utility
You can show an animation or use a progress bar or whatever during the loop.
0
 
LVL 6

Expert Comment

by:sharmon
Comment Utility
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
 

Expert Comment

by:irman_herdiana
Comment Utility
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now