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
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
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