List:MySQL ODBC« Previous MessageNext Message »
From:Christian Mack Date:September 8 1999 7:34pm
Subject:Re: Newbie questions
View as plain text  
Tom wrote:
> Hi everyone.  I'm still having a hard time figuring out this whole MySQL JDBC-ODBC
> thing.  I know how ODBC works on a Windows platform, so the overall concept of ODBC is
> clear to me.
> Here's the problem: how do I "register" a DNS using either the
> twz1.jdbc.mysql.jdbcMysqlDriver or the gweMysqlDriver?  I've installed twz1 (per
> installation instructions) to a subdirectory that's in the classpath..still I get the
> message "driver not found".  How do I make this driver available to a program?  In
> Windows, it's a matter of using the ODBC manager to laod the driver in the
> registry...what's the equivalent function in a Linux environment?
> Sorry for the incoherence.  Simple instructions would be much appreciated!

Hi Tom

You are a little confused here.
JDBC is not ODBC!!!
You only get an JDBC-ODBC-bridge with the SUN VM.
To use this bridge, you have to use "jdbc:odbc:// ..." instead of "jdbc:z1MySQL:// ..."
(see Fourth).
This is used like any JDBC driver.
This means, that you can't use DSN's.

Please forget gwe driver it is over one year old and not maintained anymore (= read awfull

In order to use an JDBC driver, you have to include its classes into the CLASSPATH and you
have to load him into the JDBC driver manager (= class java.sql.DriverManager).

The loading thing is done by:

This should only happen once in your program.

You actually use the JDBC by getting a Connection via the DriverManager class like this:
    String uRL = "jdbc:z1MySQL://";
    String userName = "root";
    String userPasswd = "Secret";
    try {
        Connection con = DriverManager.getConnection( uRL, userName, userPasswd );
    catch (SQLException sqlE1) {
        // Unsuccessful attempt to connect to mysql on

You shoud look at the java.sql package documentation and the examples that come with the
twz driver.


PS: Sorry for the late answer, I was really busy.

Newbie questionsTom24 Aug
  • Re: Newbie questionsChristian Mack8 Sep