Dear friends:
I got some problem when I tried to retrieve data from oracle.
Following is part of my code
*********************************************
. /* create table*/
String createString;
createString = "create table ATMSimulation " +
"(USR_ID VARCHAR(20), " +
"SavingAmount FLOAT, " +
"CheckingAmount FLOAT, " +
"Total FLOAT)";
Statement stmt;
/* table is craeted successfully */
.
ResultSet rset = stmt.executeQuery(
"select Total from atmsimulation where
USR_ID=\'cwu4\'");
while (rset.next ())
{
float n=rset.getFloat("Total");
System.out.println(n);
}
...
*********************************************
and I got the error message:
***** Error message *****
kaffe.util.NotImplemented
at java/lang/Throwable.<init>(24)
at java/lang/Error.<init>(17)
at kaffe/util/NotImplemented.<init>(16)
at java/math/BigDecimal.<init>(25)
at oracle/sql/NUMBER.<clinit>(3031)
at oracle/jdbc/oracore/JavaConversion.NumberBytesToFloat(line unknown,
p
c 0x86ef087)
at oracle/jdbc/driver/OracleStatement.getFloatValue(line unknown, pc
0x8
6ed7a5)
at oracle/jdbc/driver/OracleResultSet.getFloat(line unknown, pc
0x86f114
f)
at oracle/jdbc/driver/OracleResultSet.getFloat(line unknown, pc
0x86f10e
4)
at CreateATMSimulation.main(44)
*************** end of the error message ********
I create a table like following:
user_id Saving Checking total
-------- ------- -------- -----
cwu4 100 20 120
test 300 40 340
...
and everything is ok using SQLPLUS on oracle, But I just get the error message
if I use JDBC to access data from oracle. Can somebody can give me help-- how
to solve this problem.
the other problems is if I modify the query as follow:
"select * from atmsimulation where usr_id=\'cwu4\' "
then I got the error message as following:
***** error message ***
SQLException: ORA-03120: two-task conversion routine: integer overflow
******* end of error message ******
Can some body help me to solve the problem?
I try to write a code to access data from oracle server. I have to create
function to retrieve data ((select)) and update date to oracle ((update)).
Do anyone have more information to pointout how to achieve it?
Note: I install Oracle 8.0.5 on linux box with JDBC (8.1.5 thin)--
classes111.zip and Java 1.1.6_v5.
Thanks in advance,
Regards,
Chien-Lung wu
--
Chien-lung Wu
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]