Processing your request... SQL Timeout

Posted on 2004-04-22
Last Modified: 2012-05-04

I have an page that runs a stored procedure on SQL Server 2000. The trouble is that the query can take over a minute to run and I get the following exception:

"System.Data.SqlClient.SqlException: Timeout expired."

What I want to know is:

   - How do I display a "Please wait we are processing your request..." notice while the query is running.


   - How do I increase the timeout from the 30 second default.

I have tried but without success.
Question by:deno2
  • 3
  • 2
LVL 28

Expert Comment

Comment Utility
for displaing message you can use this scenario
Label.Text = "Please wait we are processing your request...";
call the stored procedure

to increase the timeout
you have to use
SqlConnection con = new SqlConnection();
con.ConnectionTimeout = 1200; //for example


Author Comment

Comment Utility
I've tried that but now my code won't compile.

I get:

C:\Inetpub\wwwroot\e\Components\Comparisons.cs(26): Property or indexer 'System.Data.SqlClient.SqlConnection.ConnectionTimeout' cannot be assigned to -- it is read only
LVL 28

Assisted Solution

mmarinov earned 125 total points
Comment Utility
:( sorry it was property of the sqlcommnad not of sqlconnection

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.


Author Comment

Comment Utility
I did:

// set timeout
myCommand.SelectCommand.CommandTimeout = 1200;

and it worked fine. Thanks for the help with that - it's been bugging me for ages.

I'm still having trouble with:

Label.Text = "Please wait we are processing your request...";

It's as if the response.flush part is not doing it's job. The message is not displayed until the query has finished.

Ideally, this is what I want to happen.

- User clicks button on form.

- Screen clears and message is displayed.

- Query runs.

- Query Finishes.

- Message is removed.

- Form and Results are displayed.
LVL 28

Expert Comment

Comment Utility
LVL 21

Accepted Solution

tovvenki earned 125 total points
Comment Utility
Hi have look at this url

for displaying the "Please wait we are processing your request..." message while the query is getting processed.

Hope that this helps you.


Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now