jdbc : No suitable driver

jdbc : No suitable driver

Post by jhyi » Thu, 11 May 2000 04:00:00



When i run a java program connecting to informix db (which is well done
standalone) in IE5.0 No suitable driver exception occured.
Why?
 
 
 

jdbc : No suitable driver

Post by Tom Bes » Thu, 11 May 2000 04:00:00


You probably have not registered your driver.  A line like this registers
Sun's JDBC-ODBC bridge driver:

     Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

And a line like this registers Oracle's JDBC driver:

     DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

You will probably do something like the latter if you have an Informix JDBC
driver.

Tom Best


Quote:> When i run a java program connecting to informix db (which is well done
> standalone) in IE5.0 No suitable driver exception occured.
> Why?


 
 
 

jdbc : No suitable driver

Post by new » Sat, 13 May 2000 04:00:00


For informix, the set up is pretty easy. I had an implementation of that. I
assumed that you follow the normal procedure of

1) registering the driver
2) getting the connection
3) create the statement
and the like....

Of course, make sure your CLASSPATH had been amended with the informix
driver path AND your connection URL is correct. For informix, your
connection URL also takes a port and a database file specification. That is
something to really be careful on. Most likely you specify something
incorrectly in the connection URL.

rgds,
Chris

> You probably have not registered your driver.  A line like this registers
> Sun's JDBC-ODBC bridge driver:

>      Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

> And a line like this registers Oracle's JDBC driver:

>      DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

> You will probably do something like the latter if you have an Informix
JDBC
> driver.

> Tom Best



> > When i run a java program connecting to informix db (which is well done
> > standalone) in IE5.0 No suitable driver exception occured.
> > Why?

 
 
 

1. db2 jdbc driver -- no suitable driver for db2profc

Hi All

I am trying to use sqlj.
I wrote my sqlj program. Compiled my program to get .java and .ser files.
Now when i try to use db2profc i get this error

jdbc:db2://ws3311:6789/cwsdb Test_SJProfile0.ser
Exception in thread "main" java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getConnection(DriverManager.java:532)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at COM.ibm.db2.sqlj.DB2SQLJInstaller.main(DB2SQLJInstaller.java:941)

I have db2java.zip in classpath.
I am able to run my jdbc programs without any problem.

code from my sqlj program
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver").newInstance();

try {
        ctx = DefaultContext.getDefaultContext();
        if (ctx == null){
      String url = "jdbc:db2://ws3311:6789/cwsdb";
        con = DriverManager.getConnection(url,"mkumar","unique12");
        ctx = new DefaultContext(con);
        DefaultContext.setDefaultContext(ctx);
        }
        }
        catch(Exception e){
                e.printStackTrace();
        }

2. SQL Server Personal-Installation Error

3. HELP - JDBC: No Suitable Driver Error

4. Dos Batch file in FM Pro

5. JNDI JDBC TOMCAT MYSQL pb:no suitable driver

6. Optimizer change in 11.5.1?

7. JDBC:ODBC No suitable Driver error

8. MAX column-wise operation?

9. JDBC-Applet-Error : No suitable Driver

10. No suitable driver when using JDBC in Java applet

11. JDBC-ODBC SQLAnywhere No Suitable Driver

12. jdbc.odbc No suitable Driver, in jre1.3