wood burning stoves*
The moose likes JDBC 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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DSN-Less MSAccess connection issues" Watch "DSN-Less MSAccess connection issues" New topic
Author

DSN-Less MSAccess connection issues

Willy Ray
Greenhorn

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

http://www.coderanch.com/t/405966/java/java/Trying-access-Microsoft-Access-java

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?

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

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"

/w
Willy Ray
Greenhorn

Joined: May 04, 2008
Posts: 11
Anybody?

/w
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"
 
Consider Paul's rocket mass heater.
 
subject: DSN-Less MSAccess connection issues