This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
After correcting for the 32-bit/64-bit driver problem in Win7,
I entered the necessary (I thought) DSN's to get MSAccess
usage with a Java program.
I went under c:\windows\syswow64\ to find odbcad32 and ran it
to get the 32-bit drivers set up:
On the first display under the System DSN tab, I clicked "Add".
On the next window "Create New Data Source,
I clicked on Microsoft Access Driver (*.mdb) and clicked "Finish".
On the third window, I entered th MSAccess DB name in the Data
Source Name field "Atb_Basc".
I entered a description in the Description field.
Under Database, I clicked on "Select" then found the MSAccess
database, clicked on it to update it into the DSN.
At this point, the System DSN should have the Data Source Name
connected to the actual database.
I repeated the above for a User DSN just to be sure.
All appears to be correct but I get an error message during the
connection process. (Let me add that this code was working fine
when I was using WinXP.) The Java code snippets are:
And the full error message displayed is:
"Failed to get DB connection./java.sql.SQLException: [Microsoft][ODBC Driver Manager]
Data Source Name not found and no default driver specified."
But I used that Data Source Name in the Driver setup and I connected it to the DB.
Obviously I've missed or forgotten something since the last time I worked on this
set of programs.
Can someone please advise what I am missing?
Joined: Oct 01, 2008
ARRRRRGGGHHHH! I mis-spelled the name.
After all these years, spelling can be your biggest error producer.
Always re-check spelling (especially before posting on JavaRanch).