Skip site navigation (1) Skip section navigation (2)

getting integer info.

From: Mark Molenda <mark(dot)molenda(at)eds(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: getting integer info.
Date: 2003-02-19 13:10:36
Message-ID: 1045660241.1054.7.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Two JDBC questions.  I'm using the JDBC driver that I created when
compiling postgres.  

1) I use the following line to connect to postgres when I'm running
servlets on the same machine as the database.

conn =

How do I change this URL to be used when connecting across the lan?

2) It seems that there is a problem getting an integer from a result
set.  If you use a simple select statement and it fills the result set
with a string you can use the   result.getString("columnname");  and it
works fine.  If you the same type of select with an integer column, and
you use result.getInt("columnname"), it immediately goes to the catch
block.  (result is really a ResultSet object instance).

Any help in this would be very helpful.



pgsql-novice by date

Next:From: Jeff DeroshiaDate: 2003-02-19 13:51:30
Subject: Re: getting integer info.
Previous:From: Tom LaneDate: 2003-02-19 07:24:43
Subject: Re: base36 sequence

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group