How to access postgresql database using jdbc driver?

From: "Robson Martins" <robson(at)netalfa(dot)com(dot)br>
To: "pgsql-interfaces" <pgsql-interfaces(at)postgresql(dot)org>
Subject: How to access postgresql database using jdbc driver?
Date: 1999-07-07 14:13:23
Message-ID: 004c01bec882$dfc536a0$1ed4d2c8@Designer2.netalfa.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hello all.
My name is Robson.
I'm starting on java language yet, and I'm having problems to access postgre sql database with jdbc.
I have PostgreSQL 6.5, JDK1.1.8, and a jdbc driver to JDK1.1.x
I'm using the comands:
Class.forName("postgresql.Driver"); -> to select the type of database
Connection db = DriverManager.getConnection("jdbc:postgresql://200.210.212.4:5432/imf", "username", "password"); -> to connect to the database
But i dont know how I check if worked, and I get a lot of errors.
Anybody can send me a example .java that show me how to load the driver, connect to the database, see if worked, create tables, and others, using postgres 6.5?
I didnt find on the web.
Please anybody help me with this!
I'm waiting any answer...
Robson ( robson(at)netalfa(dot)com(dot)br )

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 1999-07-07 14:18:46 Re: [INTERFACES] Peculiar behaviour in libpq
Previous Message Rolland Crunk 1999-07-07 08:48:33 Re: [INTERFACES] JDBC - large objects