Link to home
Start Free TrialLog in
Avatar of bnrtech
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(Global.Application.My.Settings.SQLServer)
            Dim MySTPObject As New SqlClient.SqlCommand("StoredProcedureName", connection)
            With MySTPObject
                .CommandType = CommandType.StoredProcedure
                .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
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial