AStronus
asked on
Timeout expired for executing ms-sql store procedure?
I receive time out error message for executing ms-sql store procedure message (Timeout expired -2147217871) using ADODB.Connection
How to I increase Time Out interval?
How to I increase Time Out interval?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry itmelo beat me to it
ASKER
I'm using ConnectionString
and set
oConn.ConnectionString=".. .."
oConn.ConnectionTimeout=90 0000000
oConn.Open
recordset=OConn.Execute(". ...")
but I still receive Time out
:(
and set
oConn.ConnectionString="..
oConn.ConnectionTimeout=90
oConn.Open
recordset=OConn.Execute(".
but I still receive Time out
:(
Set the CommandTimeout not the ConnectionTimeout property. In other words:
oConn.ConnectionString=".. .."
oConn.CommandTimeout = 0 'Infinite timeout
oConn.Open
recordset=OConn.Execute(". ...")
Anthony
oConn.ConnectionString="..
oConn.CommandTimeout = 0 'Infinite timeout
oConn.Open
recordset=OConn.Execute(".
Anthony
If the stored procedure times out, you might first check how much time it needs to execute (using query analyser). If there it takes only seconds, then you need to check why the connection takes so much time, otherwise start optimizing the proc
CHeers
CHeers
ASKER
ConnectionTimeout doesn't work for me, as I change ConnectionString to ADODB.Command and set Time out it's work great. Sorry, all answer is correct but I can give pts to 1 person only.
oConn.ConnectionTimeout = 30
For a Command:
oCmd.CommandTimeout = 30