2

I'm trying to migrate a project from HXTT to UCanAccess and the only thing I'm having trouble at the moment is the auto truncation of data. For example if I try to insert a text that is longer than the field declaration (300 characters in a 255 char field), UCanAccess will raise an SQL Exception.

I've tried using jdbcCompliantTruncation=false (which I'm not even 100% certain that is used for that purpose), but it didn't work.

George Sofianos
  • 440
  • 1
  • 7
  • 17
  • 1
    `jdbcCompliantTruncation` seems to be a MySQL property, as far as I can find, it is not a property of UCanAccess. – Mark Rotteveel Mar 16 '16 at 15:05
  • I'm fairly certain that currently there is no UCanAccess configuration option to allow the silent truncation of string values that exceed the maximum width of a [Short] Text field. Even Access itself is inconsistent in this regard: the Access ODBC driver will silently truncate an over-length string value while the Access OLEDB driver will throw an error. – Gord Thompson Mar 18 '16 at 01:39
  • Thanks for your comments, Gord if you want you can post it as an answer so I can accept it. Since my scripts generate these sql statements, I have added a workaround to truncate the necessary fields, but it would be nice if there was an option to do it automatically. I usually report these things to project maintainers, but in ucanaccess case, I can't find any active issue tracker. – George Sofianos Mar 18 '16 at 12:16

0 Answers0