Re: [INTERFACES] ResultSet....

Lists: pgsql-interfaces
From: PostgreSQL <postgres(at)sys(dot)com(dot)mx>
To: Robson Martins <robson(at)netalfa(dot)com(dot)br>
Cc: pgsql-interfaces <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] ResultSet....
Date: 1999-07-21 10:57:41
Message-ID: Pine.LNX.4.10.9907210655570.23336-100000@gonzo.sys.com.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

On Wed, 21 Jul 1999, Robson Martins wrote:

> Hello all, i want to make a select count(*) and set a variable with this value i''m using the command:
> rs = st.executeQuery("select count(*) from imoveis where imo_situ = 'venda' and imo_tipo = 'kiti'");
> total = rs;
> But this doesnt work!
> How do i do what i want?
> I use Postgresql 6.5 and everything is working right (database connection), i only want to know how do i do this!
> Help me..
> Hugs...Robson
>

Hi there

total = rs.getInt("count");

Leonel Nunez


From: "Robson Martins" <robson(at)netalfa(dot)com(dot)br>
To: "pgsql-interfaces" <pgsql-interfaces(at)postgresql(dot)org>
Subject: ResultSet....
Date: 1999-07-21 13:23:40
Message-ID: 000701bed37cfe796a0000701bed37c$3fe796a0$1ed4d2c8@Designer2.netalfa.com.bred4d2c8@Designer2.netalfa.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

Hello all, i want to make a select count(*) and set a variable with this value i''m using the command:
rs = st.executeQuery("select count(*) from imoveis where imo_situ = 'venda' and imo_tipo = 'kiti'");
total = rs;
But this doesnt work!
How do i do what i want?
I use Postgresql 6.5 and everything is working right (database connection), i only want to know how do i do this!
Help me..
Hugs...Robson


From: Constantin Teodorescu <teo(at)flex(dot)ro>
To: Robson Martins <robson(at)netalfa(dot)com(dot)br>
Cc: PostgreSQL Interfaces <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] ResultSet....
Date: 1999-07-21 14:08:06
Message-ID: 3795D446.569D45E7@flex.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

First of all :

PLEASE, FIND A GOOD JAVA BOOK AND LEARN JAVA AND JDBC!
Also, download JDBC documentation from Sun and read it!
You will find all the information you need and even some examples.
This list is * NOT * intented to be used for Java (JDBC) training.

> Robson Martins wrote:
>
> Hello all, i want to make a select count(*) and set a variable with
> this value i''m using the command:
> rs = st.executeQuery("select count(*) from imoveis where imo_situ =
> 'venda' and imo_tipo = 'kiti'");
> total = rs;
> But this doesnt work!

Try total = rs.getInt(1);

Best regards,
--
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA