Connecting to PostgreSQL via web

From: "Agrawal, Manish" <MAgrawal(at)coba(dot)usf(dot)edu>
To: 'Jason Tishler' <jason(at)tishler(dot)net>
Cc: Pgsql-Cygwin <pgsql-cygwin(at)postgresql(dot)org>
Subject: Connecting to PostgreSQL via web
Date: 2003-02-11 23:21:12
Message-ID: 00A42578900AD411BCFD00A0C978DC9304DC01B7@mail.coba.usf.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

Thanks much Jason.

I am trying to connect to the pgsql database from a jsp application. The
database, webserver and the application are all running locally.

The problem is that I am able to read data from the database successfully
but am not able to write to it. I also don't get any SQLException message. I
simply get a blank page. The connection is opened using:

Connection con = DriverManager.getConnection("jdbc:odbc:PostgreSQL_test",
"Administrator", "<pwd>"); // PostgreSQL_test is the user DSN

The statement creating the problem is:
rs.updateString("middle_name", "Joe");

I am able to successfully edit fields using pgAdmin though. Also, String
strTemp = rs.getString("first_name"); works fine.

Would appreciate help. My system information is:
Windows 2000
Sun ONE Community edition IDE
Netscape 7.0 eternal browser
Field middle_name is VARCHAR 255

Thanks
Manish

-----Original Message-----
From: Jason Tishler [mailto:jason(at)tishler(dot)net]
Sent: Tuesday, February 11, 2003 3:54 PM
To: Agrawal, Manish
Cc: Pgsql-Cygwin
Subject: Re: Gotcha!!! Installing PostgreSQL 7.3.1 on windows 2000

Manish,

On Mon, Feb 10, 2003 at 04:15:38PM -0500, Agrawal, Manish wrote:
> I tried the following just after I sent my last email and it worked:
> $ rm /data/postmaster.pid
>
> I followed with:
> $ pg_ctl start
> postmaster successfully started

I thought of suggesting removing the .pid file, but I thought the error
message for that case was different than what you reported. In
hindsight, I don't know how I missed the following:

On Mon, Feb 10, 2003 at 04:08:59PM -0500, Agrawal, Manish wrote:
> $ pg_ctl start
> pg_ctl: Another postmaster may be running. Trying to start postmaster
> anyway. Found a pre-existing shared memory block (Key 5432001, id 0)
> still in use. If you're sure there are no old backends still running,
> remove the shared memory block with ipcrm(1), or
> just delete "/data/postmaster.pid".
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I apologize for not suggesting the above earlier.

I'm glad that you are up and running.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6

Browse pgsql-cygwin by date

  From Date Subject
Next Message S. L. 2003-02-12 07:39:16 Re: Latest cygwin always crashing with Postgres
Previous Message Seth Rubin 2003-02-11 23:11:43 Latest cygwin always crashing with Postgres