Mark Lawther wrote: > The new field is defined in the OPEN DATAQUEUE statement as DEC(3,0) > (see snippets below). I now receive the error "Runtime error > '-2147217887 (80040e21) Multiple-step OLE DB operation generated > errors." Looking at the DQ's record set in VB debug, I can see the > new field contains the error. Also, the next field in the record set > is shifted left 1 byte. I have verified the DQ definition on the > AS/400 matches the VB definition. The AS/400 field is zoned, not > packed. Mark, I believe that the Decimal data type is most likely packed. To solve this, I'd either define dqEdsNo as 5.0 p or 3.0p and shift everything one down (which you could make easier on yourself by defining the lengths only and not using the from and to designators). Bill
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Reading data queue containing a zoned decimal field
Collapse
X
-
-
Reading data queue containing a zoned decimal field
If you've got the TAA Toolkit, place a few entries on the Queue and then try DSPDTAQ to get a feel for what the Data actually looks like. Maybe that will help you figure out what's wrong. Copy and Paste it to your next Post.... I'd be interested to see what the numeric field looks like.
Comment
-
Reading data queue containing a zoned decimal field
I have a VB program that reads from a data queue. It has been working well but new functionality requires me to add a zoned decimal field. The new field is defined in the OPEN DATAQUEUE statement as DEC(3,0) (see snippets below). I now receive the error "Runtime error '-2147217887 (80040e21) Multiple-step OLE DB operation generated errors." Looking at the DQ's record set in VB debug, I can see the new field contains the error. Also, the next field in the record set is shifted left 1 byte. I have verified the DQ definition on the AS/400 matches the VB definition. The AS/400 field is zoned, not packed. Using CA Express ADO/DB driver, latest service pack installed. OS/400 V4R5. What am I missing? Thanks in advance, Mark
Code
Comment
-
Reading data queue containing a zoned decimal field
Bill, Your solution did work. Apparently the server job (QZDASOINIT) had a lock on the original RPG pgm and it kept running the old object even after it had been recompiled. Once my server job timed out and the pgm was replaced everything worked great. Thanks for your help, Mark
Comment
-
Reading data queue containing a zoned decimal field
Mark Lawther wrote: > That idea made sense but I still get the same error. I changed the D > spec as you suggested (see snippet) and, just to make sure, I > recreated the dq and recompiled the VB too. Any other ideas? So, when you look at the variables in VB Debug, the field values are still shifted one left? Mike's suggestion about looking at the data in the queue might be worth pursuing. If you don't have a tool to view the data, I believe DmpObj can be used. Bill
Comment
-
Reading data queue containing a zoned decimal field
Mark Lawther wrote: > Your solution did work. Apparently the server job (QZDASOINIT) had a > lock on the original RPG pgm and it kept running the old object even > after it had been recompiled. Once my server job timed out and the > pgm was replaced everything worked great. Glad to hear it. Bill
Comment
Comment