Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JdbcOdbc bridge direct access method  RSS feed

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why does the following code seem to work on some machines (PC's) and not others?

public Connection getConnection(){
try {
//String dataSourceName = "IssuanceTracker";
//String dbURL = "jdbc dbc:IssuanceTracker";// + dataSourceName;
//Connection con = DriverManager.getConnection(dbURL, "","");

String filename = "c:/IssuanceTracker/IssuanceTracker.mdb";
String database = "jdbc dbc river={Microsoft Access Driver (*.mdb)};DBQ=";
database+= filename.trim();
Connection con = DriverManager.getConnection( database ,"","");
return con;
catch (Exception e) {
System.out.println("Error: " + e);
return null;
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!