Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JCDB-ODBC Bridge on Win 98 & MS Access

0 views
Skip to first unread message

Pat Vessels

unread,
Apr 10, 2002, 1:09:52 AM4/10/02
to
Greetings,

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();
}
}

PimentoTR6

unread,
Apr 10, 2002, 9:57:33 AM4/10/02
to
Are you using a System DSN or User DSN. Using a System DSN works in simnilar
situations for me, but not with User DSN. There may be a way to get a User DSN
to work with additional text in the url.

Steve

Lee Fesperman

unread,
Apr 11, 2002, 3:04:48 AM4/11/02
to
Pat Vessels wrote:
>
> 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
>
> ...

>
> String VBSdb = "jcdb:ocdb:VBS";
>

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)

0 new messages