Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > .NET Framework 1.x
|
.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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 11th, 2006, 04:45 PM
Authorized User
 
Join Date: Nov 2004
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!

 
Old December 13th, 2006, 01:44 AM
Friend of Wrox
 
Join Date: May 2006
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
 
Old December 13th, 2006, 01:10 PM
Authorized User
 
Join Date: Nov 2004
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.
 
Old December 15th, 2006, 05:42 PM
Authorized User
 
Join Date: Nov 2004
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
 
Old December 15th, 2006, 06:12 PM
Friend of Wrox
 
Join Date: May 2006
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
 
Old December 15th, 2006, 07:10 PM
Authorized User
 
Join Date: Nov 2004
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!

 
Old December 15th, 2006, 07:58 PM
Friend of Wrox
 
Join Date: May 2006
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





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





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