[ forwarding to the interfaces list ]
On Wed, 18 Mar 1998, Pierre Habraken wrote:
> I am trying to set up a connection to PostgreSql from JBuilder using the
> JDBC driver, but for now all my attempts have failed.
>
> I first compiled, tested and installed the driver on my NT 4
> workstation. Then I followed the instructions given in the JBuilder
> (Professionnal) Programming Guide:
> 1) Create a new project and a new application.
> 2) Add a Database component
> 3) Open the connection editor
> 4) Fill up the fields inside the connection editor window:
> URL Connection = jdbc:postgresql://server/database
> User Name = postgres
> Driver Class = postgresql.Driver
> and select the option 'Ask for user password'
> 5) Push down the button 'Connection test'. JBuilder pop then a message
> dialog up telling me: "no suitable driver" !
That's because the driver isn't loaded. Two ways to do this:
1) Add -Djdbc.drivers=postgresql.Driver although this won't work for
JBuilder.
2) Add something like:
Class.forName("postgresql.Driver");
to your code.
> The archive file postgresql.jar being installed in
> C:\JBuilder\myclasses, I added the path
> C:\JBuilder\myclasses\postgresql.jar to the list of default class paths,
> using the environment options editor accessed from the JBuilder menu
> 'Tools/EDI...'.
>
> I wonder what is wrong in what I am doing.
> Has anyone got successful results in trying to build a pure Java C/S
> application using JBuilder, JDBC and PosgreSql ?
>
> I would really appreciate any advice.
Can someone who's got more details for JBuilder to reply let him know, &
CC me so I can add it to the docs.
Thanks, Peter
--
Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk