OLE DB error

Discussion in 'C#' started by prasath_s01, Feb 26, 2009.

  1. #1
    I'm getting the following error on my ASP page:

    "Microsoft OLE DB Providr for SQL Server error '80040e31'

    Timeout expired

    /textapp.asp, line 300 "

    The line 300 executes a stored procedure When running with fewer records also getting the error. I tried to excute the sp manully in tha database its taking less than 8 secs.I tried setting my server.scripttimeout to 1000 and command timeout as 120 but the problems persists. What else can i do to solve this problem?

    Thanks
     
    prasath_s01, Feb 26, 2009 IP
  2. Sabbir

    Sabbir Banned

    Messages:
    210
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Add conn.CommandTimeout = 0 to set an infinite time out. Do this before

    you create the command object.

    You can also set the CommandTimeout on the command object if you like.
     
    Sabbir, Feb 28, 2009 IP
  3. riteshmodi

    riteshmodi Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sabbir is right. but i will recommend you that you should select very limited items. this will help you to speed up your performance.
     
    riteshmodi, Mar 3, 2009 IP