esc7
asked on
Timeout expired with SQL Server query
When running a stored procedure from my asp.net application I recieve the following error:
System.Data.SqlClient.SqlE xception: Timeout expired
The command object timeout property is set to the default of 30.
However when I run the same stored procedure in Query Analyzer it only take 6 seconds to complete.
What, other than the time it takes to execute the query, would cause a "timeout expired" error.
System.Data.SqlClient.SqlE
The command object timeout property is set to the default of 30.
However when I run the same stored procedure in Query Analyzer it only take 6 seconds to complete.
What, other than the time it takes to execute the query, would cause a "timeout expired" error.
ASKER
i restarted the service but no change.
i also checked to make sure that i am opening and closing a single connection... still no change.
i also checked to make sure that i am opening and closing a single connection... still no change.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
an infinite loop can also cause a timeout expired error... Maybe you can post the query here...
restart your sql service and see if that happens
that can also open if you keep opening connections without closing them in your code. always check for the connection status before you open it
HTH