I'm having a big problem getting the JCDB-ODBC bridge to work. I'm new at
this so I'm sure I'm doing something wrong, but it seems pretty straight
forward. I've created the Access database and registered it using the ODBC
data sources control panel. I'm sure the names I'm using are consistent. Any
thoughts or help would be appreciated.
The code below is very simple (almost hello world simple). It gives the
following error:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:477)
at java.sql.DriverManager.getConnection(DriverManager.java:159)
at vbs.VBSDatabase.<init>(VBSDatabase.java:27)
at vbs.VBSDatabase.main(VBSDatabase.java:53)
package vbs;
import java.sql.*;
import java.util.*;
import java.io.*;
public class VBSDatabase {
String VBSdb = "jcdb:ocdb:VBS";
public VBSDatabase() {
try {
// Load the Jdbc-odbc bridge driver
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
// Attempt to connect to the driver
Connection con = DriverManager.getConnection(VBSdb);
catch (Exception e)
{
e.printStackTrace();
}
}
Steve
Your URL is incorrect.
Try "jdbc:odbc:VBS"....
--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)