NI TestStand 2024 Q4: Error -2146825037 When Migrating from OLE DB to ODBC

Updated Jul 24, 2026

Reported In

Software

  • TestStand 2024 Q4

Issue Details

When migrating TestStand database logging from the deprecated SQLOLEDB OLE DB provider to ODBC Driver 18 via the MSDASQL bridge, database logging fails with the following error:
  

Solution

The error originates from ADO (ActiveX Data Objects) and is passed through TestStand from the underlying data provider. It occurs during the first write operation against the recordset. The affected logging statements are configured as Recordset statements with Cursor Location = Server and Cursor Type = Forward Only.

Recommended workaround: Change the cursor type from Forward Only to Keyset. The Keyset option provides an updatable, scrollable server-side cursor, which is properly supported by ODBC Driver 18, allowing the insert/update operations to succeed.

To apply this change:

  1. Navigate to Configure » Result Processing » Options » Database Options » Schemas.
  2. Locate each affected Recordset statement.
  3. Change the Cursor Type from Forward Only to Keyset.