Re: getting integer info.

From: Jeff Deroshia <jeff(at)hal(dot)physast(dot)uga(dot)edu>
To: Mark Molenda <mark(dot)molenda(at)eds(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: getting integer info.
Date: 2003-02-19 13:51:30
Message-ID: 3FFA5760-4411-11D7-B971-000393A34A52@hal.physast.uga.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

The correct for is jdbc:protocol://host/database. So if your database
is business, and the host is www.abcdefg.com, then it would be:
jdbc:postgresql//www.abcdefg.com/business

Jeff Deroshia

On Wednesday, February 19, 2003, at 08:10 AM, Mark Molenda wrote:

> 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 =
> DriverManager.getConnection("jdbc:postgresql:business","postgres","");
>
> 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.
>
> -Mark
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo(at)postgresql(dot)org

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Adam Bultman 2003-02-19 15:31:45 Re: Importing Postgres 7.1.1 DBs into Postgres 7.3.2
Previous Message Mark Molenda 2003-02-19 13:10:36 getting integer info.