Navision - ODBC - mysql

zakret
zakret Member Posts: 7
Hi

I have problem with encoding during export data from navision to mysql using odbc.

Navision 40sp2
mysql - 5.0.24
odbc - 3.51

Variables:
Connection as 'Microsoft ActiveX Data Objects 2.8 Library'.Connection

After connect I'm executing:
RecSet := Connection.Execute('INSERT INTO table (field1,field2) values('xxx','xxx'),RecordsAffected,RSOption);

mysql tables and varchar fields have to have latin2 encoding.

Everything is ok, data is inserted until I want to insert special chars as ąłóężźć (regional(polish) chars). Then I have message "Error ODBC : Data too long".

If I set mysql encoding to latin1 special chars are inserted but not shows correctly.

I tried change encoding before insert in navision using ascii2ansii (from download), using CONVERTSTR with no effect.

Any ideas how to solve this, to insert correctly all chars ?

Best Regards
Tomek Zakrecki

Comments

  • kine
    kine Member Posts: 12,562
    Have you tried to experiment with the ODBC Option on MyODBC driver? For some cases you need to set some attributes to work correctly...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • zakret
    zakret Member Posts: 7
    kine wrote:
    Have you tried to experiment with the ODBC Option on MyODBC driver? For some cases you need to set some attributes to work correctly...

    Yes, I tried with different opton values. If option is not 0 (zero) there is always error, even I want to insert chars like a,b,c. With option 0 I can insert a,b,c but not my regional chars.

    t.