I'm not sure what to tell you Graham. One thing I would try is
explicitly converting the floats to strings using sprintf (or
whatever), so you can set the precision, then calling to_number() on
those values. See if that helps.
Regards,
Dan
···
-----Original Message-----
From: graham [mailto:fghfghfh@homr.vom]
Sent: Tuesday, June 07, 2005 2:15 PM
To: ruby-talk ML
Subject: Re: DBI Oracle errorBerger, Daniel wrote:
> My (possibly wrong) initial guess would be a precision
error of some
> sort in conjunction with Ruby's .to_f. Double check the the column
> types (presumably a NUMBER) and see what the precision is
set to. The
> column precision *is* set, right?
Nope - not explicitly. The column is just defined as NUMBER.
If this was
the problem - how come
a) almost identical data lines either side work correctly
b) running the data thorough again will correctly insert the
offending
row into the database (other rows fail to insert due to filing a
uniqueness constraint on the datetime column)I'm perplexed. I don't have a real debugger for Ruby.. just
the built in
one (which is a bit painful to use).
Graham