Help: SqlClient.SqlException: Timeout expired

Discussion in 'ASP .Net' started by hb, Jan 21, 2004.

  1. hb

    hb Guest

    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
    hb, Jan 21, 2004
    #1
    1. Advertising

  2. Re: SqlClient.SqlException: Timeout expired

    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" <> wrote in message
    news:...
    > 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
    >
    >
    Chris Jackson, Jan 22, 2004
    #2
    1. Advertising

  3. 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" <>
    > 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: <>
    > 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!TK2MSFTNGXA05.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
    >
    >
    >
    Mike Moore [MSFT], Jan 22, 2004
    #3
  4. hb

    hb Guest

    Mike,

    Thank you for the help!

    hb
    ""Mike Moore [MSFT]"" <> wrote in message
    news:S2By%...
    > 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" <>
    > > 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: <>
    > > 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!TK2MSFTNGXA05.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
    > >
    > >
    > >

    >
    hb, Jan 23, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Langston
    Replies:
    3
    Views:
    11,673
    evilla
    Sep 12, 2006
  2. =?Utf-8?B?TWF0dA==?=

    SqlClient.SqlException: Timeout expired.

    =?Utf-8?B?TWF0dA==?=, Mar 28, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    6,882
    =?Utf-8?B?TWF0dA==?=
    Mar 29, 2005
  3. Karl Seguin
    Replies:
    1
    Views:
    5,546
    Arun M
    Sep 4, 2007
  4. Karl Seguin
    Replies:
    0
    Views:
    594
    Karl Seguin
    Apr 14, 2005
  5. Ersin Gençtürk
    Replies:
    1
    Views:
    7,208
    jmohanty2006
    Sep 25, 2007
Loading...

Share This Page