I'm trying to insert floats into a MonetDB 5.0.0_beta1 db in table like this:
 
create table P (
  time timestamp not null,
  x numeric(5,2) not null,
  y numeric(5,2) not null
);
using code like this:
 
PreparedStatement ps = con.prepareStatement("insert into P (time,x,y) values (?,?,?)");
ps.setTimestamp(1, new Timestamp(time.getTime()));
ps.setFloat(2, x);
ps.setFloat(3, y);
 
and get an error like this:
 
java.sql.SQLException: MALException:(unknown):wrong argument for prepared statement (expected decimal instead of decimal)
Is this a bug?
 
Log detials:
 
TX 1170950011791: sPREPARE insert into P (time,x,y) values (?,?,?);
RD 1170950011791: final block: 189 bytes
RD 1170950011805: read chunk: 189 bytes, left: 0 bytes
RX 1170950011805: &5 2 3 3 3
% prepare, prepare, prepare # table_name
% type, digits, scale # name
% varchar, int, int # type
% 0, 0, 0 # length
[ "timestamp", 7, 0 ]
[ "decimal", 5, 2 ]
[ "decimal", 5, 2 ]
 
RD 1170950011805: generating prompt
TD 1170950011820: write final block: 57 bytes
TX 1170950011820: sexec 2(timestamp '2003-01-30 18:03:35.0', 71.91, 71.98);
RD 1170950011820: final block: 100 bytes
RD 1170950011820: read chunk: 100 bytes, left: 0 bytes
RX 1170950011820: !MALException:(unknown):wrong argument for prepared statement (expected decimal instead of decimal)
 

Anders Blaagaard
Nordea e-Markets
Tel: +45 3333 6257
e-mail: anders.blaagaard@nordea.com

This transmission is intended solely for the person or entity to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, please be notified that any dissemination, distribution or copying is strictly prohibited. If you have received this transmission by mistake, please let us know and then delete it from your system.