Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Help: SqlClient.SqlException: Timeout expired

Reply
Thread Tools

Help: SqlClient.SqlException: Timeout expired

 
 
hb
Guest
Posts: n/a
 
      01-21-2004
Hi,

I got the "System.Data.SqlClient.SqlException: Timeout expired. " error on
my web
application while saving some data.

Would you please tell me how to change the settings in SQL Server 2000 or
IIS to
increase the timeout?

Thank you

hb


 
Reply With Quote
 
 
 
 
Chris Jackson
Guest
Posts: n/a
 
      01-22-2004
You can change the CommandTimeout property of the SqlCommand object.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"hb" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I got the "System.Data.SqlClient.SqlException: Timeout expired. " error on
> my web
> application while saving some data.
>
> Would you please tell me how to change the settings in SQL Server 2000 or
> IIS to
> increase the timeout?
>
> Thank you
>
> hb
>
>



 
Reply With Quote
 
 
 
 
Mike Moore [MSFT]
Guest
Posts: n/a
 
      01-22-2004
Hi,

This is controlled by the command object's CommandTimeout property. You can
use this to set the time (in seconds) to wait for the command to execute.
The default is 30 seconds.

Dim myCommand As New SqlCommand()
myCommand.CommandTimeout = 60

Does this answer your question?

Thank you, Mike
Microsoft, ASP.NET Support Professional

Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.

This posting is provided "AS IS", with no warranties, and confers no rights.


--------------------
> From: "hb" <(E-Mail Removed)>
> Subject: Help: SqlClient.SqlException: Timeout expired
> Date: Wed, 21 Jan 2004 18:42:18 -0500
> Lines: 15
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> Message-ID: <(E-Mail Removed)>
> Newsgroups: microsoft.public.dotnet.framework.aspnet
> NNTP-Posting-Host: x403446fe.ip.e-nt.net 64.52.70.254
> Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP12.phx.gbl
> Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:204045
> X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
> Hi,
>
> I got the "System.Data.SqlClient.SqlException: Timeout expired. " error on
> my web
> application while saving some data.
>
> Would you please tell me how to change the settings in SQL Server 2000 or
> IIS to
> increase the timeout?
>
> Thank you
>
> hb
>
>
>


 
Reply With Quote
 
hb
Guest
Posts: n/a
 
      01-23-2004
Mike,

Thank you for the help!

hb
""Mike Moore [MSFT]"" <(E-Mail Removed)> wrote in message
news:S2By%(E-Mail Removed)...
> Hi,
>
> This is controlled by the command object's CommandTimeout property. You

can
> use this to set the time (in seconds) to wait for the command to execute.
> The default is 30 seconds.
>
> Dim myCommand As New SqlCommand()
> myCommand.CommandTimeout = 60
>
> Does this answer your question?
>
> Thank you, Mike
> Microsoft, ASP.NET Support Professional
>
> Microsoft highly recommends to all of our customers that they visit the
> http://www.microsoft.com/protect site and perform the three

straightforward
> steps listed to improve your computer's security.
>
> This posting is provided "AS IS", with no warranties, and confers no

rights.
>
>
> --------------------
> > From: "hb" <(E-Mail Removed)>
> > Subject: Help: SqlClient.SqlException: Timeout expired
> > Date: Wed, 21 Jan 2004 18:42:18 -0500
> > Lines: 15
> > X-Priority: 3
> > X-MSMail-Priority: Normal
> > X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> > Message-ID: <(E-Mail Removed)>
> > Newsgroups: microsoft.public.dotnet.framework.aspnet
> > NNTP-Posting-Host: x403446fe.ip.e-nt.net 64.52.70.254
> > Path:

>

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
> phx.gbl!TK2MSFTNGP12.phx.gbl
> > Xref: cpmsftngxa07.phx.gbl

microsoft.public.dotnet.framework.aspnet:204045
> > X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> >
> > Hi,
> >
> > I got the "System.Data.SqlClient.SqlException: Timeout expired. " error

on
> > my web
> > application while saving some data.
> >
> > Would you please tell me how to change the settings in SQL Server 2000

or
> > IIS to
> > increase the timeout?
> >
> > Thank you
> >
> > hb
> >
> >
> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Ersin Gençtürk ASP .Net 1 09-25-2007 07:33 AM
Re: System.Data.SqlClient.SqlException: Timeout expired. The timeout p Karl Seguin ASP .Net 1 09-04-2007 11:34 AM
Urgent: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. VB Programmer ASP .Net 4 01-24-2006 04:48 AM
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Guoqi Zheng ASP .Net 4 06-03-2004 06:39 PM
Re: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Bob Johnson ASP .Net 0 08-07-2003 12:52 PM



Advertisments