Perry Forman
Perry Forman

Reputation: 3

Forcing timeout in C# app on call to sql server

I am testing out a c# app that invokes a stored proc in sql server 2014. Specifically I want to test how the app reacts to a timeout encountered running the sp.

I've setup a lock in management studio using waifor which works like a champ. Where I'm stuck is I've changed all the configuration parameters I can find in my sql server but the sp still waits for the waitfor code to run then happily processes the update.

Is there a way to configure how long the call to the db will wait for a return before timing out?

Upvotes: 0

Views: 78

Answers (1)

usr
usr

Reputation: 171178

SQL Server never times out queries. The client does that. Configure the CommandTimeout property in ADO.NET.

Upvotes: 1

Related Questions