|
All, Has anybody experienced a "false positive" on CAE V5R1 using the seek method of the ADO provider? here is the relevant code: Set cnDB2 = New ADODB.Connection cnDB2.CursorLocation = adUseServer cnDB2.Open "Provider=IBMDA400;Data Source=192.168.1.2;", "", "" ' Set rsUPCWeb = New ADODB.Recordset rsUPCWeb.CursorLocation = adUseServer rsUPCWeb.Index = "/QSYS.LIB/BPCSCDUSRF.LIB/UPCWEBL6.FILE(*FIRST, *NONE)" rsUPCWeb.Open "/QSYS.LIB/BPCSCDUSRF.LIB/UPCWEBL6.FILE(*FIRST, *NONE)", cnDB2, adOpenStatic, adLockReadOnly, adCmdTableDirect sUPCSKU = Mid(rsOrderLines("lprod"), 1, 6) _ & "-" _ & Mid(rsOrderLines("lprod"), 7, 3) _ & "-" _ & Mid(rsOrderLines("lprod"), 10, 2) _ & "-" _ & sTape If Not IsEmpty(KeyValues) Then Erase KeyValues End If KeyValues = Array(sUPCSKU, rsOrderLines("lcust")) rsUPCWeb.Seek KeyValues, adSeekFirstEQ Here is a DSPFD over UPCWEBL6: Record format . . . . . . . . . . . . : IUPCWEB Key field . . . . . . . . . . . . : USKU Sequence . . . . . . . . . . . . : Ascending Sign specified . . . . . . . . : UNSIGNED Zone/digit specified . . . . . . : *NONE Alternative collating sequence . : No Key field . . . . . . . . . . . . : UCUST Sequence . . . . . . . . . . . . : Ascending Sign specified . . . . . . . . . : SIGNED Zone/digit specified . . . . . . : *NONE Alternative collating sequence . : No sUPCSKU is a string, and the rsOrderLines("lcust") is from iSeries data, packed 6 on the iSeries, and whatever that translates to in an ADO data type. Watching my code in debug mode, I can see the valuve of sUPCSKU and rsOrderLines("lcust"). There is no match in rsUPCWeb for these key values. Seek does not return an error, but rsUPCWeb.EOF is set FALSE after the seek, indicating a match. Yet, dumping the keyfields from rsUPCWEB shows that they don't match sUPCSKU and UCUST! Anybody have any ideas? TIA, Chris
As an Amazon Associate we earn from qualifying purchases.
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.