Ans
Posts: 53
|
Posted: 06/01/2006, 7:59 PM |
|
I am trying to write a custom code for an event. The system is jsp on MS SQL Server 2000.
JDBCConnection conn = JDBCConnectionFactory.getJDBCConnection("spcDB");
long week = Utils.convertToLong(e.getRecord().getControl("week").getValue()).longValue();
long yr = Utils.convertToLong(e.getRecord().getControl("year").getValue()).longValue();
long ownID = Utils.convertToLong(e.getRecord().getControl("ownerID").getValue()).longValue();
long target = Utils.convertToLong(e.getRecord().getControl("target").getValue()).longValue();
String sql = "EXEC getWkOwn "+
conn.toSql(String.valueOf(yr),JDBCConnection.INTEGER)+
"," + conn.toSql(String.valueOf(week),JDBCConnection.INTEGER)+
"," + conn.toSql(String.valueOf(ownID),JDBCConnection.INTEGER)+
"," + conn.toSql(String.valueOf(target),JDBCConnection.FLOAT);
conn.executeUpdate(sql);
e.getCommand().setSql(sql);
conn.closeConnection();
The problem is the target value does not get executed in decimal format, but integer. I have set the format of the input textbox to 'FLOAT'.
Does 'JDBCConnection.FLOAT' exists?
|