Brian,

First, thanks for your help.   I tried the following code

            ECMD = sess.CreateUniCommand()
            ECMD.Command = "SSELECT " & strAP & _
                           " BY SEQ " & _
                           " WITH INVN = " & invnum & _
                           " AND WITH VENDOR = " & vendnum & " TO 0"

            ' Select keys
            ECMD.Execute()
            slAP = sess.CreateUniSelectList(0)
            Dim strarrAP() As String = slAP.ReadListAsStringArray()

            ' Loop through the string array of AP keys
            Dim I As Int32
            For I = 0 To strarrAP.Length - 1
                ' Get the next key
                AP_ID = strarrAP(I)
                           .
                                           .
                                           .
                Next I

After the line "Dim strarrAP() As String = slAP.ReadListAsStringArray()" 
executes, strarrAP is equal to Nothing.  I am certain there are records 
for the invoice number I entered. The first time the array is accessed, it 
throws an exception (presumably because it is set to nothing)..

I am not understanding something.

I have been mulling around moving some of the logic to the server, but in 
this case the program is only reading a few fields from a few files.  No 
updating of the Unidata database.  If the VB.NET commands will work, that 
seems like a quick easy was to get the data.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation




Brian Leach <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
09/26/2007 05:40 AM
Please respond to u2-users

 
        To:     <[email protected]>
        cc: 
        Subject:        RE: [U2] UniSelectList problem


Charles

What happens if you get the entire list, using

slAP.ReadListAsStringArray()

You can then check the contents of the list stepping through and iterate 
through the array instead of using the Next() method.


Brian,

I tried the following.  I set a breakpoint at 

If Seq = "000" Then
-------
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/

Reply via email to