Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Java - setFloat()

Java - setFloat()

From: Oliver Wong <oliverwong_at_aforce.com>
Date: Wed, 31 Oct 2001 15:23:46 +0800
Message-ID: <3BDFA702.8A024360@aforce.com>


I want to store the RATE into table PO_HEADER. But the table just store the value 123.123.. Why it cannot store 123.123456?
Please help me! Thank you!

Table PO_HEADER: // Using Oracel 8i
NUMBER(10,6) //size=10 ; scale=6

float zz=(float)123.123456;
pstmt=con.prepareStatement("insert into PO_HEADER (RATE) values (?)"); pstmt.setFloat(1,zz);
pstmt.executeUpdate(); Received on Wed Oct 31 2001 - 01:23:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US