Subject | RE: [Firebird-Java] data truncation |
---|---|
Author | Fred Vlietstra |
Post date | 2009-02-17T19:50:15Z |
Mark,
I get the error on the following statement :
stmt.setDate(++i, convertDate (record.getNotaDatum()));
stmt.setDate(++i, convertDate (record.getBetaalDatum()));
The error message is data truncation.
Regards
Fred
_____
Van: Firebird-Java@yahoogroups.com [mailto:Firebird-Java@yahoogroups.com]
Namens Mark Rotteveel
Verzonden: dinsdag 17 februari 2009 18:10
Aan: Firebird-Java@yahoogroups.com
Onderwerp: Re: [Firebird-Java] data truncation
What is the type or domain of the column you are setting and what is the
exact error message you get?
Mark
fred.vlietstra wrote:
Mark Rotteveel <Avalanche1979@ <mailto:Avalanche1979%40gmx.net> gmx.net>
[Non-text portions of this message have been removed]
I get the error on the following statement :
stmt.setDate(++i, convertDate (record.getNotaDatum()));
stmt.setDate(++i, convertDate (record.getBetaalDatum()));
The error message is data truncation.
Regards
Fred
_____
Van: Firebird-Java@yahoogroups.com [mailto:Firebird-Java@yahoogroups.com]
Namens Mark Rotteveel
Verzonden: dinsdag 17 februari 2009 18:10
Aan: Firebird-Java@yahoogroups.com
Onderwerp: Re: [Firebird-Java] data truncation
What is the type or domain of the column you are setting and what is the
exact error message you get?
Mark
fred.vlietstra wrote:
> Does anyone know why I get an datatruncation error when using the--
> setDate method see code below :
>
> stmt = c.prepareStatement(INSERT);
> stmt.setString(++i, record.getNota_Recid());
> stmt.setString(++i, record.getLid_Recid());
> stmt.setInt(++i, record.getFile_ID());
> stmt.setDouble(++i, record.getNotaBedrag());
> stmt.setDouble(++i, record.getBetaald());
> stmt.setString(++i, record.getBetaalRek());
> stmt.setDate(++i, convertDate
> (record.getNotaDatum()));
> stmt.setDate(++i, convertDate
> (record.getBetaalDatum()));
> stmt.setInt(++i, record.getUitDraai());
> stmt.setDouble(++i, record.getSub1());
> stmt.setString(++i, record.getReknr1());
> stmt.setInt(++i, record.getBtw_Code1());
> stmt.setDouble(++i, record.getSub2());
> stmt.setString(++i, record.getReknr2());
> stmt.setInt(++i, record.getBtw_Code2());
> stmt.setDouble(++i, record.getSub3());
> stmt.setString(++i, record.getReknr3());
> stmt.setDouble(++i, record.getSub4());
> stmt.setString(++i, record.getReknr4());
> stmt.setInt(++i, record.getGeboekt());
> stmt.setString(++i, record.getReferentie());
> stmt.setString(++i, record.getOmschrijvingLang
> ());
> stmt.setString(++i, record.getVerNr());
> stmt.setInt(++i, record.getNetGeprint());
>
> stmt.executeUpdate();
>
>
> private java.sql.Date convertDate(Date datum)
> {
> return new java.sql.Date(datum.getTime());
>
> }
Mark Rotteveel <Avalanche1979@ <mailto:Avalanche1979%40gmx.net> gmx.net>
[Non-text portions of this message have been removed]