AW: Using the JDBC Driver in version 7.02

Поиск
Список
Период
Сортировка
От tna@FIZ-Karlsruhe.DE
Тема AW: Using the JDBC Driver in version 7.02
Дата
Msg-id 41EA24EC431CD411AA8200008385014F490FAB@pc.FIZ-Karlsruhe.DE
обсуждение исходный текст
Список pgsql-general

> > > Justin Jaynes wrote:
> > > >
> > > > the line:
> > > >
> > > > Class.forName("org.postgresql.Driver");
>
> Try:
>
>     Class.forName("postgresql.Driver");
>

In 7.02 the above is WRONG,

Class.forName("org.postgresql.Driver");

is right ...

(Drivername has changed in this version)


> Ofcource, check that postgresql.jar is in classpath.  If Java >= 1.2,
> you can instead drop it in $JAVA_HOME/jre/lib/ext.
>
> > > >
> > > > I get an error that the DriverManager cannot find a
> suitable driver.
> > > >
> > > > The code I use to connect goes as follows:
> > > >
> > > > Connection chamber =
> DriverManager.getConnection("localhost:5432");
> >
> > This isn't a valid JDBC URL. You'll need something like:
> >
> >     jdbc:postgresql:database            <= Use when on local host
> >     jdbc:postgresql://server/database    <= Use when on remote host
> >
>
>
> --
> marko
>
>
>

В списке pgsql-general по дате отправления:

Предыдущее
От: tna@FIZ-Karlsruhe.DE
Дата:
Сообщение: AW: JDBC and LOB
Следующее
От: "Alex Bolenok"
Дата:
Сообщение: PostgreSQL, ODBCExpress and locales