Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > .NET Framework 1.x
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 11th, 2006, 04:45 PM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default Verify completion of Stored Proc before continuing

Is there a way within asp.net to verify that a stored procedure has completed running before executing the next line of code?

Thanks for the help!

Reply With Quote
  #2 (permalink)  
Old December 13th, 2006, 01:44 AM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you having trouble with this? The call to the stored proc should be blocking until it is complete.

Woody Z
http://www.learntoprogramnow.com
Reply With Quote
  #3 (permalink)  
Old December 13th, 2006, 01:10 PM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I guess I am having a problem with this because it seems like the next few lines of code beneath the execution of the stored proc are being ran before the stored proc is finished.
Reply With Quote
  #4 (permalink)  
Old December 15th, 2006, 05:42 PM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default

During the execution of the stored procedure, does asp.net wait until it has confirmation that the process has finished before it executes the next line? If it does, is there a way to make the program wait 2-3 seconds before executing the next line which requeries the table just effected by the stored procedure?

Thanks
Reply With Quote
  #5 (permalink)  
Old December 15th, 2006, 06:12 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I assume you are using a command object, and when you call the ExecuteNonQuery method this will block until it returns from the stored proc. It isn't so much waiting for "confirmation", it is just a typical method call that must run through its internal code before it can return.

What is youir actual problem? I think you are asking for solution, but you aren't describing the problem.

Woody Z
http://www.learntoprogramnow.com
Reply With Quote
  #6 (permalink)  
Old December 15th, 2006, 07:10 PM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default

We have a multiple step application that displays a record count and a "Total Pounds" in a text box. This gives the user the ability to check and make sure that the information was collected from multiple source is correct. The user then starts the stored procedure which takes all that information and places it in the appropriate table throughout our Sql Server. After that, it requeries the records and if they have all been moved around successfully, there should be no data in the original table and thus reports a 0 - Record Count and 0 - Pounds. Every now and then, when the requery takes place, it reports a few records and pounds are still in there. When you force a requery, all of the records and pounds have been moved and it zeros out. I hope that is not too conviluted!!! Thanks for your help!

Reply With Quote
  #7 (permalink)  
Old December 15th, 2006, 07:58 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Unless you are executing the stored proc call in a separate thread, the call should be blocking. There might be something else going on that isn't clear at this time that we need to consider.

Woody Z
http://www.learntoprogramnow.com
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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stored Proc that returns a value elygp SQL Server 2000 4 May 9th, 2007 01:05 AM
Calling an insert stored proc from a select stored dzitam SQL Language 10 April 2nd, 2007 12:39 PM
How to get value from stored proc busybee ASP.NET 1.0 and 1.1 Basics 4 April 2nd, 2006 01:06 AM
optional where in stored proc david_ste SQL Server ASP 2 October 27th, 2005 07:16 AM
Simplify the stored proc stephanel SQL Server 2000 3 August 5th, 2003 08:45 PM



All times are GMT -4. The time now is 06:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.