I'm actually surprised that worked....Microsoft deprecated the
Precision and Scale properties of the OracleParameter type.

http://msdn2.microsoft.com/en-us/library/system.data.oracleclient.oracleparameter.precision.aspx

They suggest just using the Math classes to round:

http://msdn2.microsoft.com/en-us/library/ms131275.aspx

But maybe that's exactly what iBATIS.NET is doing.

Still weird how 1.23 blew the NUMERIC(38,?) limit upon creating the
parameter...perhaps there were trailing 0's?  But decimal can only
have a precision of 28?  Weird.  I'd be interested if anyone knew the
answer, just out of curiosity.

Clinton

On 1/19/07, Dustin Aleksiuk <[EMAIL PROTECTED]> wrote:





> When I try to insert a .net Decimal value into an Oracle decimal column, I
get this error: "numeric precision specifier is out of range (1 to 38)". I
googled it and found lots of advice to > > increase the precision on the
database. I've been fiddling with it for a bit but I can't get it to work.
These aren't currently big numbers either. My test data for now is stuff
like "1.23".

I figured it out. For future posterity, I used the "precision" and "scale"
XML attributes.

For example:

<parameter property="SedimentAndWaterPercentage"
precision="22" scale="8" column="sed_water_percentage"/>

Sorry to bother you,
Dustin

Reply via email to