NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect string value when updating ODBC version

We have updated our database from MySQL 5.5 to MariaDB 10.6 and used ODBC driver version MySQL 5.3.
Since we updated our database we decided to update our ODBC driver as well to version MariaDB 3.19.
In some cases, we now get this error when logging to database:

Description: [ma-3.1.19][10.6.16-MariaDB-1:10.6.16+maria~ubu2004]Incorrect string value: '\xFF'\xB5SD ...' for column `teststand`.`PROP_RESULT`.`DATA` at row 1
Number: -2147217913
NativeError: 1366
SQLState: 22008
Reported by: Microsoft OLE DB Provider for ODBC Drivers


If using the MySQL 5.3 ODBC driver we can log to the database without any issue.
The DATA column is defined as Varchar 255 in the database.
And in our schema in TestStandDatabaseSchemas.ini we have defined it as String(VarChar) with size 255.

If changing the the schema in TestStandDatabaseSchemas.ini and define the PROP_RESULT.DATA as String(BSTR) with size 255:

isabell_L_0-1708068499829.png


We can save our string to the database.
I have tried to find out why this is the case and have not fully found why.
In the TestStand Help I found in "Known Issues":

isabell_L_1-1708068530281.png


Also, I found that the default: TestStandDatabaseSchemasDef.ini
Only specifies String(VarChar) for Mysql and Sybase schemas, other default schemas use String(BSTR).

 

The behavior is the same for both TS2017 and TS2023.

I have tried to debug the DBLog project but I cannot find out why this is change can make it work, and if it is a valid fix for this issue since the database column actually is a VarChar column.

 

If someone can give me some input I would much appreciate it!

0 Kudos
Message 1 of 1
(208 Views)