Wendy Smoak wrote:

>Christophe Marchal wrote:
>  
>
>>I'm discovering the uniobject in java, and I don't find how to do a 
>>SELECT command and retreive ID.
>>I only find the UniSelectList that have a select() method on 
>>an UniFile. 
>>But what I want is somthing like :
>>SELECT MYFILE WITH MY.FIELD = "bar" AND WITH MY.OTHER.FIELD = "foo"
>>    
>>
>
>The select statement is done with the UniCommand class, then you can get
>the select list:
>
>UniCommand uCommand = uSession.command ( "SELECT AGRESREL SAVING
>AGRESREL.ID");
>uCommand.exec();
>UniSelectList uSelect = uSession.selectList( 0 );
>answer =  uSelect.readList() ;
>System.out.println ("answer = " + answer) ;
>
>Let me know if you need a more complete example, the code above assumes
>you can get a connected UniSession already.
>
>  
>
Thank you very much, it workes very well :-)
It was not so clear from the docs.
Is it always 0 as the id of the selectlist ?
And what if I do a second select from the same command ?

Christophe
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to