Hi. I'm using GDatabase to write data to a MySQL server. The project is in Sweden and I would like to be able to write swedish letters å,ä and ö, but that gives me the following error:
<Error from MySQL server>Incorrect string value: '\xE5 defa...' for column 'Title' at row 1
I managed to create the query by doing following: I sent an empty MySQL reference into the "Insert query" and this generated the query before returning the error:
Dequeue Element in Acquire Semaphore.vi:3480001->MySQLVIEW.lvlib:MySQLConnector.lvclass:Insert.vi:700001->Write New Measurement v2 no datacluster.vi
INSERT INTO `measurement` (Text, Title, UserID, TimeStart) VALUES ("default text", "ÅÄÖ", 9, "2016/11/04 13:28:00.297981");
The query itself is perfect and understood by the MySQL server, but I can't seem to send it through the GDatabase library. Is there a possible workaround?
I think you have to convert your "LabVIEW String" to a UTF8 encoded string by using the "Convert string to UTF8" VI (You will find this VI in GDatabase for MySQL palette -> Utility).
When you get back data from MySQL server you could have to convert UTF8 encoded String to a "LabVIEW String" by using the "Convert UTF8 to String" VI.
I hope this will work, please let me know,
It works! Thank you. I was looking for options in the Insert block itself, but now it works. Thank you for the fast response.