none
ODBC Blocking Transaction? RRS feed

  • Question

  • Hi,

     

    I need a blocking transaction when executing SQL. How to do it?

    I use ODBC. in System.Data.Odbc namespace.

     

    I get this, which I think is non-blocking thats why it return immediately.

    Code Snippet

    ERROR [40001] [Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

     

     

    I used a Serializable for the isolation level of transaction. How to make the transaction to wait until other transaction complete instead of getting the error immediately?

     

    Thanks,

    Max

    Tuesday, August 28, 2007 1:54 AM