[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Invalid Precision Value error

krassimir

5/23/2005 5:12:00 PM

I am trying to call a s1032 (system 1032) stored procedure using available
ODBC driver (Simba). The procedure has input parameters of type decimal and
here is the way I prepare the decimal parameters.

cmd.Parameters.Add(New OdbcParameter("DECIMAL_IN", OdbcType.Decimal)).Value
= decimal_in
cmd.Parameters("DECIMAL_IN").Direction = ParameterDirection.Input
cmd.Parameters("DECIMAL_IN").Precision = 12
cmd.Parameters("DECIMAL_IN").Scale = 2

However I get the following error:

ERROR [HY104] [Simba][SimbaClient ODBC Driver]Invalid precision value.

I am using version 1.1 of the .Net Framework.

I came across an article id: 811239 on msdn that there is a known problem of
the version 1.0 odbc.net managed provider. It always binds a decimal data
type with a precision of 28 and ignores whotever you set the precisopn to in
code.

Has anyone know if this is still the case with the 1.1 version of odbc.net?

Your help will be appreciated.

Krassimir