Error -2147024362 When Logging to MySQL DB on TestStand

Updated Apr 23, 2026

Reported In

Software

  • TestStand

Operating System

  • Windows

Other

  • Visual Studio 2019
  • Visual Studio 2022
  • Desktop development with C++ Workload

Issue Details

  • I recently updated Windows 10 to build version 19045.5011. This was an automatic Windows Update KB5044273. Now when I use a MySQL database in TestStand I get error -2147024362.

  • My company has migrated all workstations to Windows 11 and now, every time I try to log data to a MySQL database in TestStand, I see the error -2147024362.

 

 

An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging'

An error occurred executing a statement.

 

Schema: MySQL Insert (NI)
Statement: PROP_BINARY.
Description: Arithmetic result exceeded 32 bits.
Number: -2147024362
NativeError: -2147024362
SQLState:
Reported by: Provider

 

How do I get around this error?

Solution

This is a known issue that that affects TestStand (64-bit) 2025 Q1 or earlier and began occurring after Windows Update KB5044273 for Windows 10, and KB5044285 for Windows 11. 

 

To resolve this issue, you need to rebuild the DBLog.dll using Visual Studio. Please, follow the guide below for a workaround

 

Table of Contents

 

 

 

Setup Visual Studio

 

Follow the steps below to make Visual Studio ready for building the DLL:

 

  1. Make sure you have Visual Studio and the Desktop development with C++ workload.

    If you don’t have the Desktop development with C++ workload installed, open the Visual Studio Installer application and Click on “Modify” for you Visual Studio version. 


     
  2. On the Workloads tab, select Desktop development with C++. Check the Installation details section on the right for a list of components that will be installed. You don’t need to select anything in there. It is just for your awareness.

     
  3. Click the Modify button at the bottom-right corner.

 

[Return to TOC]

 

Rebuild the DLL

 

If you have Visual Studio and the Desktop development with C++ workload ready, please follow the steps below:

 

Note: In the instructions below, 20xx corresponds to your version of TestStand

  1. Take a backup of the existing DBLog.dll from the path C:\Program Files\National Instruments\TestStand 20xx\Components\Models\TestStandModels\Database\DBLog\x64

  2. Open C:\Program Files\National Instruments\TestStand 20xx\Components\Models\TestStandModels\Database\DBLog\DBLog.vcxproj in Visual Studio.

  3. Open the DBLog Project properties - In the Solution Explorer (you can view this window by choosing View > Solution Explorer in Visual Studio), right-click on the DBLog project and choose Properties.

  4. In the dialog that comes up, include the following directories in Additional Include Directories.

    The Additional Include Directories can be brought up by selecting C/C++ in the left pane. Click on the right of Additional Include Directories and click on the drop-down and choose <Edit..>. In the dialog that comes up, add the two directory paths mentioned below to the list.

    • C:\Program Files\National Instruments\TestStand 20xx\Bin
    • C:\Program Files\National Instruments\TestStand 20xx\API\VC

    The Additional Include Directories item should look like the image below.

     
        
  5. Rebuild the project (Right-Click the project and select Rebuild).

 

[Return to TOC]

Additional Information

A non-NI workaround for this is to simply uninstall the Windows Update.

 

This bug affects builds 19044.5011 and 19045.5011 on Windows 10 and builds 22621.4317 and 22631.4317 on Windows 11. To check the build of your Windows do the following:

 

  1. Go to the Start Menu and type winver.
  2. Run the command.
  3. The second line in the dialog box that opens shows the current build version.