× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




I did a broader search of IBM's support area and, while I did not find our
specific problem, I did find some references to problems when the decimal
value is less that 1.0.


In all cases IBM's recommendation is to install the latest APAR and PTF
updates.  The AS400 already has these updates in place.  In other situations
they recommend using the latest version of MDAC (ADO).  We are using the
latest version 2.6 SP 1.



 Thankyou for your help and here is the code:


Public Sub SaveFieldToDB(rs As ADODB.Recordset, strDBField As String,
varValue As Variant)

'...

    Select Case rs(strDBField).Type
        Case adDecimal
                rs(strDBField) = CDec(varValue)


'...

If the varValue is 1.0 or greater (with and without decimal values) it works
fine.  We only have a problem if varValue is less than 1.0 (e.g., 0.26) it
gives us an error

"CWBZZ5014 Value of XECEST could not be converted to the host data type "

We have tried other casting conversions (CDbl, CSng, CVar, CCur, CStr) to no
avail.  As a stopgap we have simply add 1.0 to all adDecimal types having
NumericScale greater than 0.  This allows us to "successfully" run the
application but this will shift the burden of processing to the AS400-side
programming.  Ugly!!


Angela Wawrzaszek
Nucor Steel Auburn
IT Department


-----Original Message-----
From: Server Dave [mailto:d2ba@xtra.co.nz]
Sent: Friday, October 12, 2001 12:18 AM
To: midrange-l@midrange.com
Subject: Re: ADO -> AS/400


Angela,
Im sure I can help you if you are using VB --can you cut and paste the ADO
data access
portion of the code,so I can see whats going on?
Thanks Dave

----- Original Message -----
From: "Angela Wawrzaszek" <awawrzaszek@nucorauburn.com>
To: "Midrange Mail List (E-mail)" <midrange-L@midrange.com>
Sent: Friday, October 12, 2001 6:07 AM
Subject: ADO -> AS/400


> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> --
> [ Picked text/plain from multipart/alternative ]
> We are using ADO to bring data from a web site to the AS/400.  One of the
> fields on the as/400 is 15,5  packed decimal.  The field on the ADO side
is
> decimal.  This works fine until a value less than 1 is entered.   whole
> numbers,  decimals everything transfers correctly but if a value like .2
is
> entered the client access message    CWBZZ5014 - unable to convert to host
> data type  occurs.
>
> Any help on this one?   I know with FTP you need to convert to binary
first
> but is there something that has to be done for ADO,  and why only for some
> values?
>
>
> Thanks!
>
> Angela Wawrzaszek
> Nucor Steel Auburn
> IT Department
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>


_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.