Microsoft KB Archive/191453

= BUG: Conversion from OS/390 PACKED to DECIMAL and NUMERIC fails =

Article ID: 191453

Article Last Modified on 10/6/2004

-

APPLIES TO


 * Microsoft OLE DB Provider for AS/400 and VSAM 1.0, when used with:
 * Microsoft SNA Server 4.0 Service Pack 1

-



This article was previously published under Q191453



SYMPTOMS
An attempt to display an IBM OS/390 packed decimal record field as converted to the DECIMAL or NUMERIC automation type results in errors. The first manifestation, generally, is that there is no data to display, for example, in a Visual Basic text box.



WORKAROUND
Packed decimal fields can be converted to a string (DBTYPE_STR, CHAR) successfully.



STATUS
Microsoft has confirmed this to be a problem in the OLE DB Provider for AS/400 and VSAM component of Microsoft SNA Server version 4.0 SP1.



MORE INFORMATION
An attempt to convert an IBM OS/390 packed decimal record field to either the NUMERIC (DBTYPE_NUMERIC) or DECIMAL (DBTYPE_DECIMAL) automation types results in the following error manifestations. They are seen when running a Visual Basic consumer in debug mode.  A watch is added for the ADO recordset, and the value of the numeric field is set to "Errors occurred". When an immediate statement to view the numeric field s executed, for example, "? RS.Fields(10).Value ," the following message box appears:

           Title Bar: Microsoft Visual Basic Description: HRESULT 80040e21 (-2147217887) Errors occurred.

 An attempt to display this field/column in a text box yields either blanks or nothing. Issuing an ADO GetRows results in an error being returned from OLE DB Provider with the same HRESULT, -2147217887 (0x80040e21) and the description "Automation error."

Keywords: kbbug kbpending kbsnaonly KB191453

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.