473,385 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to run a store procedure and show users somthing is happening

Hi, I am running a store procedure, which takes a long time so i need some way of telling the user somthing is happening. Any one have a sample code of how to do this?
Oct 21 '08 #1
5 1071
Curtis Rutland
3,256 Expert 2GB
You could use a progress bar. Maybe set it to continuous. You'll want to execute the SP on a separate thread.
Oct 21 '08 #2
Plater
7,872 Expert 4TB
I have seen a sneaky trick (most often employeed in webpages, but it can work anywhere) Is to simply have some sort of animation (a gif perhaps?) that becomes visible when the task is started, and invisible when the task is completed.
There is no notion of "task is x% completed", but it does alert the user that something is happening.

I myself popup a static "LOADING..." dialog while I am doing some processing.
Oct 21 '08 #3
How is this done i was looking at using javascript to make a div visible or not, how would this be done
Oct 21 '08 #4
Curtis Rutland
3,256 Expert 2GB
How is this done i was looking at using javascript to make a div visible or not, how would this be done
Oh ok, this is web based.

Can you use the .NET Framework 3.5? There is a perfect premade solution, if you can. UpdatePanel and UpdateProgress.

If you can't, I'd suggest writing a page that does nothing but execute your SP. Then, from another page, use an XmlHttpRequest javascript object to invoke that page, and show a DIV with an animated GIF in it.
Oct 21 '08 #5
Plater
7,872 Expert 4TB
If the program flow is roughly:
  • User clicks a button(or something else)
  • A postback is fired
  • Stored procedure is executed, taking up some time
  • Results are sent back, which is a page reload

You can use the sneaky trick other websites use
  • (Page is loaded with an image hidden)
  • User clicks a button(or something else)
  • The image is unhidden (image can be a large picture of "please wait" or anything you want)
  • A postback is fired
  • Stored procedure is executed, taking up some time
  • Results are sent back, which is a page reload (which means image is hidden once more)

What I did with my page, to help ensure the user would not keep clicking the button, was to use javascript to change the CSS style of the button to be hidden and to make visible a <div> that said "Please wait..." where the button used to be
Oct 21 '08 #6

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

Similar topics

2
by: A.M. de Jong | last post by:
How does MicroSoft store the stored procedures in seperate files. What tools are used. Cause that's what I like to do too. Arno de Jong, The Netherlands. (SCPTFXR does not have the option to...
4
by: Dan | last post by:
I've encountered some strange behavior in a recursive procedure I'm writing for a bill of materials. First let me ask directly if what I think is happening is even possible: It seems like the...
7
by: George | last post by:
Hi , I am getting the below error while i am invoking a Java stored procedure from another java stored procedure. SQL0751N Routine "" (specific name "") attempted to execute a statement...
1
by: esmith2112 | last post by:
We all of a sudden find ourselves in dire straits, because we have one of those mysteries where everything used to work, and apparently, all of a sudden everything went to pot just in time for a...
6
by: Tor Inge Rislaa | last post by:
Finding current Procedure I want to write errors to a log-file, where the error log contain the description of where the error occurred and what kind of error it was. Private Sub...
16
by: Brian Tkatch | last post by:
I have a PROCEDURE that test other PROCEDUREs. Timings_Call ------------------ Id Group Name Text Timings_Log
1
by: xpcer | last post by:
hi friends, i have an problem. i use php 4 and mysql 5.0 i was create an store procedure in mysql like this, DELIMITER $$; DROP PROCEDURE IF EXISTS...
3
by: ricardo.sobral.santos | last post by:
Hi there, I cannot store an arraylist in a session. I have read some posts and still found no solution. I am sure it might be something simple, but since I have been around it for quite sometime...
2
by: jmuehe | last post by:
Hello, What are the optimal settings to use in a CREATE PROCEDURE – when creating a SQL procedure on the iSeries? To read data? To update? Here is a pretty standard one of ours. I know the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.