Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003

    Question Unanswered: How do I get rid of this problem

    Hi, I did a web page for the intranet where I work using ASP and a database in SQL Server, the connection line is the following:
    Set oConn=Server.CreateObject("ADODB.Connection")
    oConn.Open "Provider=sqloledb;Server=zapopan02;database=data; User Id=sa"
    The problem comes the first time I try to establish the connection after 5 min. (aprox) of inactivity.
    I get the following error:
    Microsoft OLE DB Provider for SQL Server error '80004005'
    Timeout expired
    Then, I refresh the page and it works fine (and keeps working until I stop using the page for a while)
    Could someone pleaseee tell me how to get rid of this problem?
    Thank in advance

  2. #2
    Join Date
    Aug 2002
    Generally some sort of problem finding the DSN. Could be lost in the global.asa file, or perhaps this is not a SYSTEM DSN.

    May refer to this KBA about connection pooling FAQ.
    --Satya SKJ
    Microsoft SQL Server MVP

  3. #3
    Join Date
    Mar 2003

    I found the answer!!

    For those who might have the same problem that I did, here is the answer to my own question:
    There is a parameter named Connect Timeout wich is 15 seconds by default, that means that if after 15 sec the connection has not been established, oledb returns an error.
    So, I changed the connection line to the following:
    oConn.Open " Provider=sqloledb;Server=zapopan02;database=data;U
    ser Id=sa;Connection Timeout=30"
    And it worked, but anyway, I dont feel so satisfied because the problem is not 100% solved, I dont get the error anymore and the page opens but its still slow the first time.
    Thanks anyway
    - Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts