Page 1 of 1

Insert of special characters into db table fails

Posted: Sun 18 Jan 2015 13:17
by kap
Hello,

I like to insert a row into my table using dotconnect for MySQL entity framework.

The table contains to fields:

index column (int)
name column (varchar)

Here is my code:

Code: Select all

// insert new value
int NextID = pe.Categories.Select(c => c.CategoryIndex).Max() + 1;

ProductsModel.Category objCategory = new ProductsModel.Category() { CategoryIndex = NextID, CategoryName = category };

pe.AddToCategories(objCategory);
pe.SaveChanges();
The string in the category name is
"W/Ö Emulsion"
The result in the database table is
"W/"
Does anyone know why it cuts the string after the slash? I dont get it...

Thank you.

Best regards,

Philipp

Re: Insert of special characters into db table fails

Posted: Mon 19 Jan 2015 10:18
by Shalex
Try using the "Unicode=True;" option in the connection string.

If this doesn't help, please give us the following information:
1) the character set of your MySQL server
2) the version of your MySQL server
3) the build number (x.x.x) of your dotConnect for MySQL
4) the datatypes of the CategoryName property in SSDL and CSDL parts of your model

Re: Insert of special characters into db table fails

Posted: Sun 25 Jan 2015 13:23
by kap
Hi Shalex,

using "Unicode=True;" did the job!

Thank you very much.

Best regards,

Philipp