The SQLSetPos function in the SQL Server ODBC driver returns SQL_SUCCESS when you use an updatable join and an update fails (919863)
The information in this article applies to:
- Microsoft ODBC Driver for SQL Server
Bug #: 296413 (SQLBUDT)
SYMPTOMSConsider the following scenario. You develop an ODBC application that uses the SQLSetPos function in the Microsoft SQL Server ODBC driver API for an updatable join. You can update one table at a time by setting the appropriate column status values to SQL_COLUMN_IGNORE. A column is updated first in one table that has a clustered index on it. A second column in the other table is updated. In this scenario, the second update will fail. However, the SQLSetPos function returns SQL_SUCCESS. The SQLGetDiagRec function returns no error information. The row status array element is SQL_ROW_ERROR. This behavior is the only sign that the update failed.CAUSEThis issue occurs because the server-side cursor does not enable the positioned updates when the delete or insert operation occurs.WORKAROUNDTo work around this issue, you can use the row status array to determine that an error occurred. The row status array returns SQL_ROW_ERROR when an error occurs. STATUS This behavior is by design.REFERENCES
For more information about updatable joins, click the following article number to view the article in the Microsoft Knowledge Base:
140532
How to use SQLSetPos in updatable joins with SQL Server
Modification Type: | Major | Last Reviewed: | 6/14/2006 |
---|
Keywords: | kbprb KB919863 kbAudDeveloper |
---|
|