Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle and MySql via ODBC - Field with special characters

jezebelSep 9 2011 — edited Oct 12 2011
Hi,
I recentely installed and configured DG4ODBC 11.2 in my environment, with Oracle 10g as Database. I have a working ODBC and I can successfully select from tables@mysql.

I have a problem with some fields in the mysql table though: various fields are named "Attività", "Località" and so on. Please, note the "à" character.

Now if I select @mysql from some table with normal field name everything works fine. But in some case I have this error:

[MySQL][ODBC 5.1 Driver][mysqld-5.0.77]Unknown column 'A1.attivit??A commessa'
in 'field list' {42S22,NativeErr = 1054}

The field true name is "attività commessa" and if in a test database I rename the field changing that "à" with a normal "a" everything start working. But of course, that is a production database and I can't change the field name.

Anyone faced that problem before?

My init entry:

HS_FDS_CONNECT_INFO = myodbc5
HS_FDS_TRACE_LEVEL = off
HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc5.so
HS_FDS_SQLLEN_INTERPRETATION=32
HS_FDS_FETCH_ROWS=1
HS_LANGUAGE=ITALIAN_ITALY.I8EBCDIC280

set ODBCINI=/usr/local/etc/odbc.ini
set SQL_MODE='ANSI_QUOTES'

Note: I added HS_LANGUAGE and SQL_MODE but tried even without those entries and it's still not working.

My odbc.ini:

[myodbc5]
Driver = /usr/lib64/libmyodbc5.so
Description = MySQL Driver DSN
SERVER = xxx.xxx.xxx.xxx
PORT = 3306
USER = user
Password = pass
Database = sm_test
OPTION = 3
SOCKET =
CHARSET = latin1

P.S.: Please don't kill me, I'm not the creator of the Mysql database with those field names!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 9 2011
Added on Sep 9 2011
47 comments
3,128 views