Hi Symeon,

I am familiar with UniBasic, but I am not sure how to get it to return XML
to a VB program.  Would you have any code examples you could share?

Thanks.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation




"Symeon Breen" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
10/17/2007 08:04 AM
Please respond to u2-users


        To:     <[email protected]>
        cc:
        Subject:        RE: [U2] ReadListAsStringArray Returns Nothing


Hi Charles - yes I have had this very same problem in the past - TBH I
donbt usually use select lists or other file operations in my VB.NET I
tend to more often call a unibasic subroutine and get it to do all the
work, returning xml. Anyway, sorry  - I never did find a solution as I
included the workload in my basic program ...

Rgds
Symeon.




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 16 October 2007 22:26
To: [email protected]
Subject: [U2] ReadListAsStringArray Returns Nothing

Using VB.NET (VS2005) with Uniobjects (IBMU2.UODOTNET)

The following code works fine, except when the select returns a list with
ONE item.

*****************************************************************
Public Function T4mGetSelectList(ByVal strCommand As String) As String()

Dim ECMD As UniCommand = Nothing
Dim slAP As UniSelectList = Nothing

Try
        ' Select list
        ECMD = sess.CreateUniCommand()
      ECMD.Command = strCommand & " TO 0"
      ECMD.Execute()
      slAP = sess.CreateUniSelectList(0)  <------  This is where the
problem occurs
      T4mGetSelectList = slAP.ReadListAsStringArray
*****************************************************************************
****************************

When the select finds one item, the ReadListAsStringArray returns Nothing.

 When the select finds more than one item, the correct number of items is
returned.  This has been verified by comparing to ECL selects.  Does
ReadListAsStringArray have a problem with arrays of one?

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/

Reply via email to