Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Accessing a Access ODBC DS with Japanese tablenames using sun jdbc-odbc bridge  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am facing a problem with accessing a Microsoft Access ODBC source containing Japanese tablenames using the Sun JDBC-ODBC Bridge.

The OS used is Windows 2000 Server. The JDK used is jdk1.4.0. I created a new mdb file using Microsoft Access 2002 and created a table having a Japanese name (I used the Microsoft IME 2000 for Japanese). Then I created an ODBC source with Microsoft Access driver and this file as the database. I tried to access the datasource using the Sun JDBC-ODBC Bridge and get the bytes of the tablename from the datasource as follows -
DatabaseMetaData dbMeta = connection.getMetaData();
ResultSet rs = dbMeta.getTables(null, null, null, new String[] {"TABLE"});
ResultSetMetaData rsmd = rs.getMetaData();

while (rs.next())
{
byte [] b = rs.getBytes(3); //table name is col no 3.

//print the bytes present in the byte array.
}
I verified this code using a few databases, the bytes returned are correct for databases having English tablenames. But for the database having Japanese tablenames the bytes returned are 63, 63, 63 which is the ASCII code for "?".
The same problem was present on using the EasySoft JDBC-ODBC Bridge.
Any suggestions what could be causing this problem ?
Regards,
Nikhil Katre.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!