incorrect string value
I work in Rad studio 10.4, using ODBC 8.0 UNICODE Driver.
I am trying to insert blob data into table with column type LONGBLOB from memory stream in c++ code. I have correct connection, cause i can read and insert data from other tables. My connection string (some fields from form):
TestConnectionString = "Provider=MSDASQL.1;Driver={MySQL ODBC 8.0 UNICODE Driver};" "Server=" + TestServerName + ";Database=" + TestDatabaseName + ";User=" + TestUserName + ";Password=" + TestUserPassword + ";Charset=utf8mb4;Option=3;";
I checked all char sets and all seems to be correct:
'character_set_client', 'utf8mb4'
'character_set_connection', 'utf8mb4'
'character_set_database', 'utf8mb4'
'character_set_filesystem', 'binary'
'character_set_results', 'utf8mb4'
'character_set_server', 'utf8mb4'
'character_set_system', 'utf8'
'collation_connection', 'utf8mb4_unicode_ci'
'collation_database', 'utf8mb4_unicode_ci'
'collation_server', 'utf8mb4_unicode_ci'
But then i try to insert blob to one table, i have an error
Code:
ADOCommand->Parameters->ParamByName(FieldName)->LoadFromStream(CurvesSrotageItem->ExtraCurves.at(i).ms, ftBlob);
ADOCommand->Execute();
while (ADOCommand->States == TObjectStates() << stExecuting)
Sleep(100);
error:
[MySQL][ODBC 8.0(w) Driver][mysqld-8.0.22]Incorrect string value: '\xA0\xA4@]\x00\x00...' for column 'Diagram' at row 1
I have exactly the same code for another table (tables fully identical) and it works fine. What's the problem? What else i need to do?