From: Dan on
I have found how to set the SQL lock_timeout setting with the connection
string using JDBC, but it appears it's impossible with ado.net. Is there a
way and I am just overlooking it?
From: Magnus Ahlkvist on
On 7 Dec, 03:28, Dan <D...(a)discussions.microsoft.com> wrote:
> I have found how to set the SQL lock_timeout setting with the connection
> string using JDBC, but it appears it's impossible with ado.net. Is there a
> way and I am just overlooking it?

You can use SET LOCK_TIMEOUT in your T-SQL statements (stored
procedure or adhoc query).

/Magnus
www.underlandet.com/SqlServer (swedish)
From: Dan on
Yes, I know how to use the SET LOCK_TIMEOUT. I was wondering if there is a
way to set it from the application for ALL stored procedures that get
executed on a connection so that I don't have to change and test 100 stored
procedures.

"Magnus Ahlkvist" wrote:

> On 7 Dec, 03:28, Dan <D...(a)discussions.microsoft.com> wrote:
> > I have found how to set the SQL lock_timeout setting with the connection
> > string using JDBC, but it appears it's impossible with ado.net. Is there a
> > way and I am just overlooking it?
>
> You can use SET LOCK_TIMEOUT in your T-SQL statements (stored
> procedure or adhoc query).
>
> /Magnus
> www.underlandet.com/SqlServer (swedish)
> .
>
From: "Charles Wang [MSFT]" on
Hi Dan,
As far as I know that there is no such settings in database access APIs
like ADO.NET libraries. You need to use "SET LOCK_TIMEOUT" as a workaround
now.

If you have any concerns with this, you can submit your feedback at
https://connect.microsoft.com/sql so that our product team can hear your
voice.

Thank you!.

Best regards,
Charles Wang