Received: from paris.netalfa.com.br ([200.210.212.12]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA44521 for ; Wed, 21 Jul 1999 13:29:02 -0400 (EDT) (envelope-from robson@netalfa.com.br) Received: from Designer2 ([200.210.212.30]) by paris.netalfa.com.br (8.9.2/8.9.2) with SMTP id OAA22205 for ; Wed, 21 Jul 1999 14:32:00 -0300 (EST) Message-ID: <000c01bed39e$1e9187a0$1ed4d2c8@Designer2.netalfa.com.br> Reply-To: "Robson Martins" From: "Robson Martins" To: "pgsql-interfaces" Subject: Re: [INTERFACES] ResultSet.... Date: Wed, 21 Jul 1999 14:26:07 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 -----Mensagem original----- De: Constantin Teodorescu Para: Robson Martins Cc: PostgreSQL Interfaces 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!