Win a copy of Kubernetes in Action this week in the Cloud/Virtualization 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;
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!