Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle9i: NUMBER fields being set to scientific number

 
Busty Sinclair
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
During insertion of a row, I am having a problem with 2 fields: fieldA and fieldB,
both are type NUMBER and are set programmatically as double,
fieldA is programmatically set to 99.0 while fieldB is set to 1.0
both are being set to the same scientific no in the DB which changes upon each insertion , e.g 1E-29
Whats really wierd is fieldC which is also set programmatically to 99.0, is a double and a NUMBER in the DB is set fine.
fieldC precedes the other 2 in the SQL stmt.
The oracle trace output shows that the container has passed on the correct values to the driver.
I tried the explicit setting of the field type in jbosscmp-jdbc but it didn't help.
I can insert through TOAD successfully, it appears to be the driver but I'm using the latest one.
I am using Oracle 9i with driver ojdbc14.jar, JBoss3.0.6
Any help would be GREATLY appreciated!
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well there is 'NUMBER' and there is a 'NUMBER' (you see the difference?)
If your just using simple 2 decimal places just use 'NUMBER (10,2)' 8 digits before the decimal place, 2 after.
my guess is you have NUMBER (38) at the moment..?
 
Busty Sinclair
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I should have made that clearer.
fieldA and fieldB are : NUMBER (12,2)
while fieldC is : NUMBER (16,6)
thanks for the reply
[ August 27, 2003: Message edited by: Busty Sinclair ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic