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

ID: Q192652


The information in this article applies to:
  • Microsoft OLE DB Provider for ODBC, versions 1.5, 2.0


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.


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.


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.


STATUS

This behavior is by design.


REFERENCES

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

Additional query words: kbOLEDB200 kbOLEDB150 kb3rdParty kbODBC

Keywords :
Version : WINDOWS:1.5,2.0
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: November 10, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.