INF: dbnextrow Does Not Return Fail on DeadlockLast reviewed: April 29, 1997Article ID: Q109649 |
The information in this article applies to:
SUMMARYIf a process running dbnextrow() is chosen as the victim of a deadlock resolution (SQL Server error 1205) the call to dbnextrow() will return NO_MORE_ROWS. The SQL Server message handler will be invoked with the correct message number (1205). The DB-Library (DB-Lib) error handler will not be invoked. The following is the SQL Server error 1205:
Your server command (process id #%d) was deadlocked with another process and has been chosen as deadlock victim. Re-run your command. MORE INFORMATIONThis is the expected behavior of DB-Library. To handle the condition, check for error 1205 in the message handler, and use the dbsetuserdata function to communicate this to your application. An example can be found in Chapter 4 on DB-Library functions in the SQL Server "Programmers Reference for C" under dbsetuserdata. Additionally, you can find an example of how to detect a deadlock condition in "Appendix E Maximizing Consistency and Concurrency" in the SQL Server for Windows NT "Programmer's Reference for C" or in the "Maximizing Database Consistency and Concurrency" Manual for SQL Server for OS/2 version 4.2b.
|
Additional query words: Windows NT
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |