This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot connect to an Access 2007 Database (mdb)

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I copy the code from the web that I want to connect to an Access 2007 database to Java
x86 office and x64 windows
the patient.mdb file is located in the same folder as the class files.

There are some messy codes in the stack trace.Here is where it happenedThanks.
Note that I've installed the AccessDatabaseEngine.exe file
I have created a DSN entry. Strange
Jack
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like the Microsoft ODBC driver has sent you an error message in some language other than English. From your name I would guess it might be Chinese? At any rate something between the ODBC driver and wherever you displayed the stack trace has applied an incorrect charset encoding to the error message, rendering it unreadable.

Did you run the program at the command line, and then copied and pasted the stack trace from there? If so, you might get better results by running the program in an IDE like Netbeans or Eclipse -- but if you don't have one of them, installing one could be a lot of work. Alternatively you could try changing the code-page of the command line with the "chcp" command line. Although you'd have to look up a list of possible code-page values and see if there was one for your language.

Or alternatively you could modify your system so that English was its default language -- but this might be a radical step as well.
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or if you want something simpler to try at first, try specifying the full path to the database file after "DBQ=" instead of relying on the database file being in your current working directory.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay now, was using the wrong JDK x64
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic