Thread: Re: [QUESTIONS] Accessing Postgresfrom JBuilder using JDBC

Re: [QUESTIONS] Accessing Postgresfrom JBuilder using JDBC

From
Pierre Habraken
Date:
Aaron Dunlop wrote:
>
> I've gotten JDBC connections from JBuilder, but only queries - no
> updates.
>
> To get the connection to work from within the IDE (e.g. when the
> application is not actually running) you have to add the path to
> postgresql.jar to the IDEClassPath entry in JBuilder.ini
> (C:\JBuilder\bin\JBuilder.ini) on my system.
>
> My entry reads
> IDEClassPath=..\lib\jbuilder.zip;..\lib\jbcl.zip;..\lib\jgl.zip;..\java\lib\classes.zip;..\java\lib\postgresql.jar

I checked this: the entry for postgresql.jar is already present in
JBuilder.ini.


> Then you'll have to apply a patch to the Postgresql JDBC driver. I don't
> have the changes in patch form handy, but I think they came out over the
> patches mailing list recently, so you can probably get them from the
> archive.
> It's just changing the default response of two functions in
> ResultSetMetaData.java
> to "return 0" instead of throwing an exception.

Do you know where I can get this patch ?
The site ftp://ftp.postgresql.org has been unreachable since yesterday
evening, at least from where I reside (France). I tried to browse mirror
sites but I did not find there anything such as a jdbc patch related to
Jbuilder.


> After that, I'm still at a loss as to why the update queries I send are
> never
> actually updated in the DB.

As for me, this will be the next step...


> Hope that helps a bit,

It does help, because I know at present (1) that it is possible to
connect the Jbuilder environment and Postgres and (2) that I am not
alone on the earth trying to do that !

Anyway, thanks for your reply.

Pierre
--
________________________________________________________________________
Pierre HABRAKEN - mailto:Pierre.Habraken@ujf-grenoble.fr
Tél: 04 76 51 48 87 - Fax: 04 76 51 45 63
Université Joseph Fourier - Département Scientifique Universitaire
Adresse postale : CAFIM/DSU BP53 38041 Grenoble Cedex 9
________________________________________________________________________

Re: [QUESTIONS] Accessing Postgresfrom JBuilder using JDBC

From
Patrick Scott Pierce
Date:
You did use it '-i' switch in starting postmaster, right?  (sorry if you
have already gone through that one).

Also, I don't use the user and password fields but instead supply it in
the URL, like so:
jdbc:postgresql://some.domain.somewhere.com/database?user=postgres&password=something&auth=password

skip Username and Password and put 'postgresql.Driver' in Driver Class.

It does work and Aaron has made some head way with the updates.  We now
just can't update 'DATE' types.

Patrick Scott Pierce
pspierce@mindspring.com
CGI Programming
Mindspring Enterprises




On Fri, 20 Mar 1998, Pierre Habraken wrote:

> Date: Fri, 20 Mar 1998 14:45:27 +0100
> From: Pierre Habraken <Pierre.Habraken@ujf-grenoble.fr>
> To: Aaron Dunlop <dunlopa@adscomputers.com>
> Cc: pgsql-questions@postgreSQL.org, pgsql-interfaces@postgreSQL.org
> Subject: Re: [QUESTIONS] Accessing Postgresfrom JBuilder using JDBC
>
> Aaron Dunlop wrote:
> >
> > I've gotten JDBC connections from JBuilder, but only queries - no
> > updates.
> >
> > To get the connection to work from within the IDE (e.g. when the
> > application is not actually running) you have to add the path to
> > postgresql.jar to the IDEClassPath entry in JBuilder.ini
> > (C:\JBuilder\bin\JBuilder.ini) on my system.
> >
> > My entry reads
> > IDEClassPath=..\lib\jbuilder.zip;..\lib\jbcl.zip;..\lib\jgl.zip;..\java\lib\classes.zip;..\java\lib\postgresql.jar
>
> I checked this: the entry for postgresql.jar is already present in
> JBuilder.ini.
>
>
> > Then you'll have to apply a patch to the Postgresql JDBC driver. I don't
> > have the changes in patch form handy, but I think they came out over the
> > patches mailing list recently, so you can probably get them from the
> > archive.
> > It's just changing the default response of two functions in
> > ResultSetMetaData.java
> > to "return 0" instead of throwing an exception.
>
> Do you know where I can get this patch ?
> The site ftp://ftp.postgresql.org has been unreachable since yesterday
> evening, at least from where I reside (France). I tried to browse mirror
> sites but I did not find there anything such as a jdbc patch related to
> Jbuilder.
>
>
> > After that, I'm still at a loss as to why the update queries I send are
> > never
> > actually updated in the DB.
>
> As for me, this will be the next step...
>
>
> > Hope that helps a bit,
>
> It does help, because I know at present (1) that it is possible to
> connect the Jbuilder environment and Postgres and (2) that I am not
> alone on the earth trying to do that !
>
> Anyway, thanks for your reply.
>
> Pierre
> --
> ________________________________________________________________________
> Pierre HABRAKEN - mailto:Pierre.Habraken@ujf-grenoble.fr
> T�l: 04 76 51 48 87 - Fax: 04 76 51 45 63
> Universit� Joseph Fourier - D�partement Scientifique Universitaire
> Adresse postale : CAFIM/DSU BP53 38041 Grenoble Cedex 9
> ________________________________________________________________________
> --
> Official WWW Site: http://www.postgresql.org
> Online Docs & FAQ: http://www.postgresql.org/docs
> Searchable Lists: http://www.postgresql.org/mhonarc
>


Re: [QUESTIONS] Accessing Postgresfrom JBuilder using JDBC

From
Peter T Mount
Date:
On Fri, 20 Mar 1998, Patrick Scott Pierce wrote:

> You did use it '-i' switch in starting postmaster, right?  (sorry if you
> have already gone through that one).
>
> Also, I don't use the user and password fields but instead supply it in
> the URL, like so:
> jdbc:postgresql://some.domain.somewhere.com/database?user=postgres&password=something&auth=password

the auth parameter is no longer valid for the 6.3 driver, as the backend
now supplies this information on connection.

--
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


Re: [QUESTIONS] Accessing Postgresfrom JBuilder using JDBC

From
Patrick Scott Pierce
Date:
Can't speak for what is happenning on the backend but I know that w/out
the auth param I was constantly greeted w/ a dialog box to input my
password and userid whether it was in the URL or not.  And then it would
never accept it.

Patrick Scott Pierce
pspierce@mindspring.com
CGI Programming
Mindspring Enterprises




On Sat, 21 Mar 1998, Peter T Mount wrote:

> Date: Sat, 21 Mar 1998 10:04:55 +0000 (GMT)
> From: Peter T Mount <postgresdev@maidast.demon.co.uk>
> To: Patrick Scott Pierce <pspierce@slacker.design.mindspring.net>
> Cc: Pierre Habraken <Pierre.Habraken@ujf-grenoble.fr>,
>     Aaron Dunlop <dunlopa@adscomputers.com>,
>     pgsql-questions@postgreSQL.org, pgsql-interfaces@postgreSQL.org
> Subject: Re: [QUESTIONS] Accessing Postgresfrom JBuilder using JDBC
>
> On Fri, 20 Mar 1998, Patrick Scott Pierce wrote:
>
> > You did use it '-i' switch in starting postmaster, right?  (sorry if you
> > have already gone through that one).
> >
> > Also, I don't use the user and password fields but instead supply it in
> > the URL, like so:
> > jdbc:postgresql://some.domain.somewhere.com/database?user=postgres&password=something&auth=password
>
> the auth parameter is no longer valid for the 6.3 driver, as the backend
> now supplies this information on connection.
>
> --
> 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
>
> --
> Official WWW Site: http://www.postgresql.org
> Online Docs & FAQ: http://www.postgresql.org/docs
> Searchable Lists: http://www.postgresql.org/mhonarc
>


Re: [QUESTIONS] Accessing Postgres from JBuilder using JDBC

From
Pierre Habraken
Date:
Peter T Mount wrote:
>
> On Fri, 20 Mar 1998, Aaron Dunlop wrote:
>
> > [...]
> > Borland's JBuilder FAQ's have a bit of information about adding JDBC
> > drivers,
> > etc. I don't have the exact URLs, but start at
> > http://www.borland.com/jbuilder
>
> I'll find the correct url, and add it to the FAQ.

I found the answer to my question in the FAQ at
http://www.borland.com/devsupport/jbuilder/qanda/484.html.
(the IDE classpath must be set twice : a first time using the 'tools/IDE
Options...' menu and then a second time by manually editing the file
jbuider.ini...)

So, the so called 'Connection Editor' now passes the connexion test.
I have added a QueryDataSet component to my app. and I am at present
#trying# to use the 'Query Editor'...

Thanks for your help.

Pierre
--
________________________________________________________________________
Pierre HABRAKEN - mailto:Pierre.Habraken@ujf-grenoble.fr
Tél: 04 76 51 48 87 - Fax: 04 76 51 45 63
Université Joseph Fourier - Département Scientifique Universitaire
Adresse postale : CAFIM/DSU BP53 38041 Grenoble Cedex 9
________________________________________________________________________