pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robson Martins <robson@netalfa.com.br>
To: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: [INTERFACES] ResultSet....
Date: Wed, 21 Jul 1999 14:26:07 -0300
Message-ID: <000c01bed39e$1e9187a0$1ed4d2c8@Designer2.netalfa.com.br> (raw)

-----Mensagem original-----
De: Constantin Teodorescu <teo@flex.ro>
Para: Robson Martins <robson@netalfa.com.br>
Cc: PostgreSQL Interfaces <pgsql-interfaces@postgreSQL.org>
Data: Quarta-feira, 21 de Julho de 1999 11:38
Assunto: Re: [INTERFACES] ResultSet....


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

Hello all and Constantin
Thanks for your big patience with me :)
I have the documentation, and i got the answer by myself.
ahh..Another thing. You gave me the wrong answer to get the count value i
have to use:
    total = rs.getInt("count");
Cya all...
Hugs...Robson!





view thread (5+ messages)  latest in thread

Message-ID: <000c01bed39e$1e9187a0$1ed4d2c8@Designer2.netalfa.com.br>
Permalink:  ../000c01bed39e$1e9187a0$1ed4d2c8@Designer2.netalfa.com.br/
Also on:    postgresql.org/message-id/000c01bed39e$1e9187a0$1ed4d2c8@Designer2.netalfa.com.br

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: robson@netalfa.com.br
  Subject: Re: [INTERFACES] ResultSet....
  In-Reply-To: <000c01bed39e$1e9187a0$1ed4d2c8@Designer2.netalfa.com.br>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox