Solved

vs 2008 c# called stored procedure wait

Posted on 2010-11-22
3
481 Views
Last Modified: 2013-12-17
How would I construct a VS 2008 C# project that calls a stored procedure to present to the user a MessageBox that would blink as the stored procedure is running and then present one final message box when the stored procedure is complete. Right now the sp takes about 4 minutes to run. I want to give the user some visual cue that it is running and then a completion message. Right now, when I call the sp, the message box immediately appears because it is not waiting for anything from SQL to tell my project that the sp is complete. How do I get my project to wait for completion?
0
Comment
Question by:rwheeler23
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:TonyReba
ID: 34189720
Have you tried ajax?  this article shows a possible workaround to what you are doing..
http://blogs.infragistics.com/aspnet/articles/show-wait-indicator-during-webdatagrid-s-ajax-requests.aspx
0
 
LVL 32

Expert Comment

by:Erick37
ID: 34189983
WinForms or WebForms?
0
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 34190330
Use Asynchronous delegates with call back on completion. Here is an example:-

YourDelegateObject.BeginInvoke("data.dat", new AsyncCallback(CallbackMethod), flusher);

void CallbackMethod(IAsyncResult result) {
   // get the delegate that was used to call that
   // method
   your code goes here
}

Please visit following links for more details:-
http://en.csharp-online.net/CSharp_Delegates_and_Events%E2%80%94Asynchronous_method_calls
http://msdn.microsoft.com/en-us/library/h80ttd5f.aspx
http://www.dotnetscraps.com/dotnetscraps/post/Explaining-Delegates-in-C-Part-4-(Asynchronous-Callback-Way-1).aspx

Hope it helps!!!
:-)
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
asp.net figure out error 3 47
ModalPopup  question 22 56
EF5 How do I stop pre-compiled views? 8 54
CSS styling problem 3 27
Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 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