Re: PostgreSQL-JDBC correct URL

From: Haroldo Stenger <hstenger(at)adinet(dot)com(dot)uy>
To: postgres general <pgsql-general(at)postgresql(dot)org>
Cc: Silvio Macedo <s(dot)macedo(at)ic(dot)ac(dot)uk>
Subject: Re: PostgreSQL-JDBC correct URL
Date: 2000-04-12 17:32:45
Message-ID: 38F4B33D.8257F3E2@adinet.com.uy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Now I need help in finding:

- A list of the errors of the backend, _WITH_ the numbers, not only the
texts.

- I need to track the queries that the backend receives, so that I can
see what GeneXus is sending to PostgreSQL.

I coudn't find this info in the doc, either. Any Ideas? Thanks in
advance.

Silvio Macedo wrote:
>
> This is what I use for JDBC:
>
> (There are other ways. Read the jdbc documentation OR the source
> directly. There are MANY examples, and the docs are more than enough.
>
> Did you read them ?!

No, because the driver has no documentation, or I couldn't find it.

>
> )
>
> final public static String DBURL =
> "jdbc:postgresql://host.domain:5432/dbname";
>
> final public static String driverName =
> "postgresql.Driver";

This worked fine. Thankyou.

>
> // The postgresql.jar must be in classpath
> Class.forName(driverName);
>
> java.sql.Connection connection =
> DriverManager.getConnection(DBURL,username,password);
>
> ...
>
> Cheers, Silvio
>
> On Mon, 10 Apr 2000, Haroldo Stenger wrote:
>
> > Hello nice people,
> >
> > /* I'm a GeneXus programmer (www.genexus.com) a RAD tool. They support natively
> > Oracle, Informix, DB2 & MS SQL Server. I'm taking steps to use and encourage use
> > by others, of PostgreSQL, which I thing is the most amazing DBMS out there these
> > days. Java is the language I chose to generate my future applications using
> > GeneXus.
> > */
> >
> > GeneXus asks me for the driver name, and for the URL of the JDBC driver. Then,
> > when trying to connect to the database, a Java java.lang.ClassNotFoundException
> > appears. I seem to be failing to tell the right name of the driver. I tried
> > gnu.postgres95.PGDriver, and others like this. And for the URL, I used
> > jdbc:postgres95:template1?user=haroldo&password=haroldo
> >
> > With this template:
> > jdbc:driver://host:port/database?option=value&user=userid&password=password I
> > wonder what 'driver' must be, if either postgres95 or postgresql or postgreSQL.
> >
> > I'm using the Postgresql 6.5 JDK1.1.x JDBC driver. Does it use the same URL
> > format as earlier versions, i.e. postgres95 versions?
> >
> > I'd like to thank in advance to Peter Mount, o whoever answers this.
> >
> >
>
> --
> ``````````` Silvio Emanuel Nunes Barbosa de Macedo (PhD Std) '''''''''''''
> smacedo(at)ic(dot)ac(dot)uk smacedo(at)inescn(dot)pt
> Intelligent and Interactive Systems Telecom. and Multimedia
> Imperial College, University of London INESC Porto
> Exhibition Road, Pc da Republica, 93
> London SW7 2AZ, England 4050-497 Porto Portugal
> Tel:+44 171 5946323 Tel:+351 22 2094220

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Silvio Macedo 2000-04-12 18:08:36 Re: PostgreSQL-JDBC correct URL
Previous Message Ken Causey 2000-04-12 16:22:19 Re: Getting number of days in a month