PRB: Decimal Values Passed to a Stored Procedure Get Truncated (188574)
The information in this article applies to:
- ActiveX Data Objects (ADO) 1.0
- ActiveX Data Objects (ADO) 1.5
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
- Microsoft Visual Basic Enterprise Edition for Windows 4.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q188574 SYMPTOMS
Values passed into a Stored Procedure may lose their decimal values.
CAUSE
This depends on the ability of the backend server to define constraints or
numeric scale for arguments used by a stored procedure. This is possible
under SQL Server, but it is not a feature in Oracle.
RESOLUTION
If you are using Oracle and Remote Data Objects (RDO) the workaround is to
change the Parameters Type property to rdNumeric. If you are using ActiveX Data Objects (ADO) and Oracle, define an appropriate Parameter object(s) and set the Parameter's NumericScale property accordingly.
Under SQL Server a numeric scale or a constraint must be defined on the
stored procedures parameter. If this is defined, then decimal values will
be received by the stored procedure. If the parameters are not defined with
numeric scale then the decimal values will be truncated.
STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 3/2/2005 |
---|
Keywords: | kbDatabase kbOracle kbprb kbRDO kbStoredProc KB188574 |
---|
|