[Monetdb-developers] [Monetdb-bugs] JDBC: Negative Integer in Prepared Statement

Stefan Manegold Stefan.Manegold at cwi.nl
Sat Oct 6 23:15:52 CEST 2007


Hi Jan,

thanks for using MonetDB,
and sorry for the inconvenience.

We'll investigate the reported problem shortly.

However, the monetdb-bugs mailing list is actually not meant to be used
directly (admittedly our fault, in case we didn't communicate this clearly
and/or haven't prevented direct postings, yet).
The monetdb-bugs mailing list is mainly meant notify developers of newly
files bug reports and their follow-up comments.

Hence, could you please file your bug using the SF bug tracker at 
http://sourceforge.net/tracker/?atid=482468&group_id=56967&func=browse
?

Thanks,

Stefan

On Sat, Oct 06, 2007 at 08:08:57PM +0200, Schaffner, Jan wrote:
> Hi,
> 
> When using prepared statements in Java, I am unable to pass negative
> integer values to the database:
> 
> String APPEND_JOURNAL = "INSERT INTO journal VALUES (?, ?);";
> st = con.prepareStatement(APPEND_JOURNAL);
> st.setInt(1, fromAcc);
> st.setInt(2, -amount);
> st.executeUpdate();
> 
> The table "journal" has two columns: account (int) and amount (bigint).
> 
> The insert statement executes without error, but inserts the positive
> value (+amount, cf. line 4). The debugger, in contrast, says something
> like "exec 3(200, -30)". Note that is has a minus in front of the
> second parameter.
> 
> Without prepared statements, however, inserting negative values works
> perfactly fine.
> 
> Thanks,
> Jan

-- 
| Dr. Stefan Manegold | mailto:Stefan.Manegold at cwi.nl |
| CWI,  P.O.Box 94079 | http://www.cwi.nl/~manegold/  |
| 1090 GB Amsterdam   | Tel.: +31 (20) 592-4212       |
| The Netherlands     | Fax : +31 (20) 592-4312       |




More information about the developers-list mailing list