Dave,
After doing some more testing, I think that I am not cleaning up the first
list before I do the second. I am rewriting the app to do all selects in
one function which will return a string array of keys. In this way I can
assure that each select is independant of any other select. Thanks.
Charles Shaffer
Senior Analyst
NTN-Bower Corporation
"Dave Davis" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
09/27/2007 08:05 AM
Please respond to u2-users
To: <[email protected]>
cc:
Subject: RE: [U2] UniSelectList problem
So can't you just use SELECT with BY SEQ instead of SSELECT?
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, September 26, 2007 5:12 PM
To: [email protected]
Subject: RE: [U2] UniSelectList problem
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/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/