Re: JDBC APPLET Problem

From: Bruno Dickhoff <bruno(at)dickhoff(dot)de>
To: v j <jvs_a(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: JDBC APPLET Problem
Date: 2001-02-01 23:32:15
Message-ID: 12045598116.20010202003215@dickhoff.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-jdbc

Hello v,

Thursday, February 01, 2001, 2:16:10 PM, you wrote:

vj> public void start() {
vj> try{ conn =
vj> DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
vj> stmt = conn.createStatement();
vj> }

Maybe you forgot to load the driver?

Excerpt from the SUN docs:
------------------------
Loading Drivers
Loading the driver or drivers you want to use is very simple and involves just one line of code. If, for example, you want to use the JDBC-ODBC Bridge driver, the following code will load it:

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

Your driver documentation will give you the class name to use. For instance, if the class name is jdbc.DriverXYZ , you would load the driver with the following line of code:

Class.forName("jdbc.DriverXYZ");

You do not need to create an instance of a driver and register it with the DriverManager because calling Class.forName will do that for you automatically. If you were to create your own instance, you would be creating an unnecessary duplicate, but it would do no harm.

When you have loaded a driver, it is available for making a connection with a DBMS.
-------------

--
Best regards,
Bruno mailto:bruno(at)dickhoff(dot)de

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message PostgreSQL Server 2001-02-02 05:11:22 Re: JDBC APPLET Problem
Previous Message Adam Haberlach 2001-02-01 22:52:28 PHP and error reporting

Browse pgsql-jdbc by date

  From Date Subject
Next Message PostgreSQL Server 2001-02-02 05:11:22 Re: JDBC APPLET Problem
Previous Message Kovacs Baldvin 2001-02-01 20:39:51 Q on JDBC's resultset