bnrtech
asked on
Timeout Expired SQL Exception
Hello,
I have a form within a Visual Basic application that executes a stored procedure (housed in sql 2000) using something like the following block of code
Using connection As New SqlClient.SqlConnection(Gl obal.Appli cation.My. Settings.S QLServer)
Dim MySTPObject As New SqlClient.SqlCommand("Stor edProcedur eName", connection)
With MySTPObject
.CommandType = CommandType.StoredProcedur e
.Connection.Open()
.ExecuteNonQuery()
.Connection.Close()
End With
End Using
The code fails to finish and causes an sqlexception with a timeout expired message. The stored procedure takes a while to finish so I have tried setting the connection timeout property for the connection string in use but regardless of what I enter I receive a timeout error after a minute or so. I have also verified that the remote query timeout setting within the sql server is set to unlimited (0). Are there any other timeout settings I could be missing or perhaps even another cause for this error?
I have a form within a Visual Basic application that executes a stored procedure (housed in sql 2000) using something like the following block of code
Using connection As New SqlClient.SqlConnection(Gl
Dim MySTPObject As New SqlClient.SqlCommand("Stor
With MySTPObject
.CommandType = CommandType.StoredProcedur
.Connection.Open()
.ExecuteNonQuery()
.Connection.Close()
End With
End Using
The code fails to finish and causes an sqlexception with a timeout expired message. The stored procedure takes a while to finish so I have tried setting the connection timeout property for the connection string in use but regardless of what I enter I receive a timeout error after a minute or so. I have also verified that the remote query timeout setting within the sql server is set to unlimited (0). Are there any other timeout settings I could be missing or perhaps even another cause for this error?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.