This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes DSN-Less MSAccess connection issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "DSN-Less MSAccess connection issues" Watch "DSN-Less MSAccess connection issues" New topic

DSN-Less MSAccess connection issues

Willy Ray

Joined: May 04, 2008
Posts: 11
Hey All, using the methods listed in this thread:

I'm trying to create a dsn-less connection to an Access Database.

I get down to "B", then I throw

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Any ideas?

[ June 25, 2008: Message edited by: Willy Ray ]
Willy Ray

Joined: May 04, 2008
Posts: 11
Oh, and when I do it like this (per the JavaRanch FAQ):

I get "java.sql.SQLException: General error"

Willy Ray

Joined: May 04, 2008
Posts: 11

Wei Dai
Ranch Hand

Joined: Jun 22, 2005
Posts: 86
Maybe you type wrongly.
>String name = "C:\\CompAnnotator\\data\notes.mdb";
Should be
String name = "C:\\CompAnnotator\\data\\notes.mdb";
You can try
A full dns-less url:
"jdbcdbcRIVER=Microsoft Access Driver (*.mdb); "
+"DBQ="+name+"; "
+"ImplicitCommitSync=Yes; "
+"UserCommitSync=Yes; "
+"Threads=3; "
+"SafeTransactions=0; "
+"PageTimeout=5; "
+"MaxScanRows=8; "
+"MaxBufferSize=2048; "
+"DriverId=281; "
+"DefaultDir=C:/Program Files/Common Files/ODBC/Data Sources"
I agree. Here's the link:
subject: DSN-Less MSAccess connection issues
jQuery in Action, 3rd edition