Found two things
The LastRecodRead property doesn't seem to work for me unless records are
being read. (Despite code samples that show it used this way.) So I
ended up using:
strAP = "A_P-INV_MA"
ECMD = sess.CreateUniCommand()
ECMD.Command = "SELECT " & strAP & _
" WITH INVN = " & invnum & " TO 0"
' Select keys
ECMD.Execute()
slAP = sess.CreateUniSelectList(0)
' Loop through the select list
vnum = ""
vname = ""
AP_ID = slAP.Next
Do While Not (AP_ID = "")
.
.
.
AP_ID = slAP.Next
Loop
2) The above code works fine when it is a SELECT statement. However the
same looping structure does not work when it is a SSELECT (sort select)
statement. The returned list is missing the first ID?
' Select keys
ECMD = sess.CreateUniCommand()
ECMD.Command = "SSELECT " & strAP & _
" BY SEQ " & _
" WITH INVN = " & invnum & _
" AND WITH VENDOR = " & vendnum & _
" TO 0"
ECMD.Execute()
slAP = sess.CreateUniSelectList(0)
' Loop through the string array of AP keys
AP_ID = slAP.Next
Do While Not (AP_ID = "")
.
. The First ID processed is the second in
.
AP_ID = slAP.Next()
Loop
The SSELECT statement works fine at ECL
SSELECT A_P-INV_MA BY SEQ WITH INVN = 7437 AND WITH VENDOR = 5594 TO 0
2 records selected to list 0.
> LIST A_P-INV_MA Z0 16:04:53 Sep 26 2007 1
A_P-INV*MA Z0..
5594*7437*000
5594*7437*001
2 records listed
However, the SSELECT statement in the VB.NET only contains the second ID
(5594*7437*001) in the list!?!?
Charles Shaffer
Senior Analyst
NTN-Bower Corporation
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/