S
staeri
When I execute a stored procedure with the following code it takes
forever and result in a timeout or a hang:
Sub TransformData()
Dim myConnection As New SqlConnection(ConnectionString)
Dim myCommand As New SqlCommand("spImport_amount_transform",
myConnection)
myCommand.CommandType = CommandType.StoredProcedure
myCommand.CommandTimeout = 3600
myConnection.Open()
myCommand.ExecuteNonQuery()
myConnection.Close()
End Sub
When I execute the same stored procedure through the Enterprise Manager
it takes less than a second.
What could be wrong and how should I start troubleshooting?
Regards,
SE
forever and result in a timeout or a hang:
Sub TransformData()
Dim myConnection As New SqlConnection(ConnectionString)
Dim myCommand As New SqlCommand("spImport_amount_transform",
myConnection)
myCommand.CommandType = CommandType.StoredProcedure
myCommand.CommandTimeout = 3600
myConnection.Open()
myCommand.ExecuteNonQuery()
myConnection.Close()
End Sub
When I execute the same stored procedure through the Enterprise Manager
it takes less than a second.
What could be wrong and how should I start troubleshooting?
Regards,
SE