O$ - 6.0 - Unicode $insert error.

Andrew Stolarz stolarz at gmail.com
Mon Mar 9 10:38:16 EDT 2015

Hello Everyone, I have an urgent issue here

I have a schema with a character limit of 255 characters. The MySQL
database column is 255 characters (varchar). When I try to do an insert
with 255 characters in omnis, it reports back:

 “Insert Error
The statement could not be executed. Data too long for column ‘testing’ at
row 1”

When I look at the variable in the $insert() command, I can see the text
and its 255 characters long. (see sample 2 below...only showing first
snippet of text with the unicode character issue). However what I believe
is happening is that when its being saved into the database, omnis is
taking sample 2, and converting it to sample 1…causing the data too long

*Sample text in quotes below shortened for simplicity:*

Sample 1: Original text from another column omnis is reading from the
database: "This is a test – 2 acre"

Sample 2: Whats being shown in the omnis variable to save in $insert()
command "This is a test – 2 acre"

I did verify to make sure that the database, tables, and columns are all
set to “utf8”

I do have the following set for the MySQL dam:

Calculate tSessionObject.$unicode as kTrue

Calculate tSessionObject.$validateutf8 as kTrue

Calculate tSessionObject.$encoding as kSessionEncodingUtf8

Calculate tSessionObject.$codepage as kUniTypeUTF8

When I manually do an insert into MySQL using mysql workbench with the same
255 character string that Omnis is using, I have no issues and it inserts
the record into the database, leading me to believe that no issues are on
the MySQL side.

Any ideas here?


More information about the omnisdev-en mailing list