ADO 2.8 and Compatibility mode

Gianluigi Sellitto 1 Reputation point
2021-07-12T15:02:07.953+00:00

If you have old code, that access Sql Server through MS-ADO 2.8, you can have some trouble if connect to DB on Sql Server 2016 with compatibility mode do 2016 (130). You can experience some random error on update:

Row cannot be located for updating. Some values may have been changed since it was last read.

The error is absolutely random. On the same table one row update go, the next no.

The only solution is to set compatibility level to 2014 (120) or 2012 (110).

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,114 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor
    2021-07-13T02:59:28.46+00:00

    Hi GianluigiSellitto-2979,

    Thanks for sharing the workaround.
    In addition, MDAC/WDAC components might be removed in future releases, and no new features will be added to components in MDAC/WDAC and it isn't recommended to use them for new application development. And when you upgrade or modify existing applications, remove any dependency on these components. Please refer to this article which might help.

    Best Regards,
    Amelia

    0 comments No comments