Re: Strange error

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Felipe Schnack <felipes(at)ritterdosreis(dot)br>
Cc: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange error
Date: 2003-01-02 14:06:38
Message-ID: 1041516398.2207.53.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Felipe,

Are you using prepared statements to do this?

Dave
On Thu, 2003-01-02 at 08:48, Felipe Schnack wrote:
> I'm getting this very strange error. I'm setting the null to Types.NULL..
>
> INSERT INTO PESSOAS (rg, cpf, nomepessoa, nascimento, sexo, email,
> endereco,bairro, codcidade,codpessoa) VALUES (null, null, 'Arno João
> Bosetti', null, 'M', null, 'Av. Prof. Oscar Pereira,1220 /908', 'Santo
> Antonio',1,1)
>
> java.sql.SQLException: ERROR: column "cpf" is of type bigint but
> expression is of type text
> You will need to rewrite or cast the expression
>
> at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:126)
> at
> org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:497)
> at
> org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:320)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)
> at
> org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Statement.java:197)
> at
> com.w2.login.daemons.UniversusImport.importPessoas(UniversusImport.java:238)
>
--
Dave Cramer <Dave(at)micro-automation(dot)net>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Felipe Schnack 2003-01-02 14:30:49 Re: Strange error
Previous Message Felipe Schnack 2003-01-02 14:02:44 Re: Strange error