Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: ADO/RDS Update Error with Third Party ODBC Drivers


View products that this article applies to.

This article was previously published under Q192652

↑ Back to the top


Symptoms

When attempting an ActiveX Data Objects (ADO)/ Remote Data Services (RDS) update, using the OLEDB provider for ODBC (MSDASQL) with a third party ODBC driver, you may receive an error.

↑ Back to the top


Cause

The error results from the third party ODBC driver not supporting positioned updates, for example SQLSetPos(). This behavior does not occur with the Microsoft ODBC driver because it does support positioned updates.

↑ Back to the top


Resolution

A workaround for this error is to use searched updates, which are described in the ODBC 3.0 Programmer's Reference book. To force searched updates with ODBC you can add a WHERE clause to the SELECT statement that forces ODBC to simulate positioned updates. Additional ODBC calls are made using the SQLPrimaryKeys or SQLStatistics functions in order to obtain the necessary unique identifiers for the update.

Another possible workaround for most ODBC drivers is to use a ForwardOnly cursor. This force the OLEDB provider for the ODBC data sources to use query based updates. Therefore, all updates to the driver are in the form of SQL updates.

Try adUseServer for CursorLocation 'Server side cursor' and ForwardOnly for CursorType before using the searched update workaround, since many third party ODBC drivers work correctly by specifying ForwardOnly for the CursorType.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


References

ODBC 3.0 Programmer's Reference; Volume 1, pg. 219.

↑ Back to the top


Keywords: KB192652, kbprb, kb3rdparty

↑ Back to the top

Article Info
Article ID : 192652
Revision : 4
Created on : 12/3/2003
Published on : 12/3/2003
Exists online : False
Views : 501