Link to home
Create AccountLog in
Avatar of cyber-33
cyber-33Flag for United States of America

asked on

MySQL ODBC Exception "Incorrect String Value: '\xEF\xBF\xBD' for column 'ExtractText' at row 1

The error above comes up when I try to execute an INSERT query fromk VB.NET using MySQL ODBC connector.


I found some posts about the error above suggesting that it may be related to the character set used by the connection. I tried modifying my connection string using CharSet = latin1 and CharSet = UTF8 parameters. The error still comes up.
Avatar of tsmgeek
tsmgeek
Flag of United Kingdom of Great Britain and Northern Ireland image

post an example of the query you are sending

what charset is the data in .NET and what charset was the table in mysql created as
Avatar of cyber-33

ASKER

The table is created using "latin1 - default collation".

I cannot really post the entire query - it is very large. It inserts a 50 page long text into a "mediumtext" size column.

Also, I suspect that the error '\xEF\xBF\xBD' refers to some chacters, that may not be visible. Not sure.

ASKER CERTIFIED SOLUTION
Avatar of tsmgeek
tsmgeek
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Here is an interesting article on how to do the conversion:

http://msdn.microsoft.com/en-us/library/kdcak6ye.aspx

I will try it and award you the points if this works.

Thank you.