By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

wait for store precedure to complete

P: 1
I have two stored procedures in SQL2008, now from my client application which is developed in VS2013 i am executing one after the other, the issue is that one line of code executes for calling the store procedure which inserts data, and then the second is executed to update the data. now the issue is that the first line code executes and the first stored procedure is executed. the data is not yet uploaded, and the second line gets executed to call the second procedure. which will be updating the data. so the data does not get updated. how can i wait for the first procedure to get completed before the second is execute. my code is :

Dim cn As New ADODB.Connection
cn.Provider = "sqloledb"
Dim provStr As String
provStr = "connection string"
cn.Open(provStr)
cn.execute("exec first_stored_procedure)
cn.execute("exec second_stored_procedure)

please help
Aug 6 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.