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;U ser 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
-RichardGenerally 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 (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q169/4/70.asp&NoWebContent=1) about connection pooling FAQ.|||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
No comments:
Post a Comment