Re: [INTERFACES] ResultSet....
От | Robson Martins |
---|---|
Тема | Re: [INTERFACES] ResultSet.... |
Дата | |
Msg-id | 000c01bed39e$1e9187a0$1ed4d2c8@Designer2.netalfa.com.br обсуждение исходный текст |
Список | pgsql-interfaces |
-----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!
В списке pgsql-interfaces по дате отправления: