Skip to content

Commit c9d21f1

Browse files
authored
Include exec before stored procedure for TDS
Closes #547.
1 parent 3c0fe1c commit c9d21f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/ecto/adapters/tds.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ defmodule Ecto.Adapters.Tds do
288288
{:ok, result} =
289289
transaction(meta, opts, fn ->
290290
query =
291-
"sp_getapplock @Resource = 'ecto_#{inspect(repo)}', @LockMode = 'Exclusive', @LockOwner = 'Transaction', @LockTimeout = -1"
291+
"exec sp_getapplock @Resource = 'ecto_#{inspect(repo)}', @LockMode = 'Exclusive', @LockOwner = 'Transaction', @LockTimeout = -1"
292292

293293
Ecto.Adapters.SQL.query!(meta, query, [], opts)
294294
fun.()

0 commit comments

Comments
 (0)