Subject | RES: [Firebird-Java] What is this? Help |
---|---|
Author | Francisco Antonio Vieira Souza |
Post date | 2004-05-20T10:33:59Z |
Thanks I will try your suggestion.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004
> -----Mensagem original--------
> De: Евгений Путилин [mailto:eugeney@...]
> Enviada em: quinta-feira, 20 de maio de 2004 03:31
> Para: Firebird-Java@yahoogroups.com
> Assunto: RE: [Firebird-Java] What is this? Help
>
>
> Hello, "Francisco!
> You wrote on Wed, 19 May 2004 23:24:54 +0000 (UTC):
>
> FAV> Message: SQL type for this field is not yet supported.
>
> FAV> private void getCliente(String cnpj)
> FAV> { try
> FAV> {
> FAV> stm = c.createStatement();
> FAV> ResultSet rs = stm.executeQuery("SELECT * FROM
> CLIENTES
> FAV> WHERE CNPJ='"+cnpj+"'");
> ^^^^^^
> You have error where cnpj contain '. You must use prepare statement and
> set param:
> PrepareStatment ps=c.prepareStatment("SELECT * FROM CLIENTES WHERE
> CNPJ=?");
> ps.setString(1,cnpj);
> ResultSet rs = ps.executeQuery();
> FAV> if (rs.next())
> FAV> {
> FAV> campoNome.setText(rs.getString("NOME"));
> FAV> campoCNPJ.setEnabled(false);
> FAV> }
> FAV> rs.close();
>
> FAV> }
> FAV> catch(SQLException se)
> FAV> {
> FAV> se.printStackTrace();
> FAV> }
> FAV> }
>
> With best regards, Eugeney Putilin.
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004
>
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004