You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Gualberto Alejandro Sanchez Caceres <gs...@itweb.com.mx> on 2001/10/03 16:56:54 UTC

Method executeQuery() of BasePeer class

once i execute the method "executeQuery()" this returns a Vector of
Record objects and I don´t find the class Record in Turbine API. How can
i obtain the values of the fields of my Query?

Thank's for your help!

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Method executeQuery() of BasePeer class

Posted by Ling Kok Choon <ko...@yahoo.com>.
Hi Gualberto Alejandro Sanchez Caceres ,

The Record object is from com.workingdogs.village, and
u may just import the following classes.

import com.workingdogs.village.Record;
import com.workingdogs.village.Value;

in order to get data from the record, try the code
below:

....
Vector result = gp.executeQuery( query );

if ( !result.isEmpty() )
{
   ...   
   Record resultRD = ( Record )result.get(0);

   Value group_id = resultRD.getValue ("GROUP_ID");
   // the GROUP_ID is the database table's column.

   Value level_id = resultRD.getValue ("LEVEL_ID");
   Value parent_id = resultRD.getValue ("PARENT_ID");
   Value label = resultRD.getValue ("LABEL");
   ...
   //to get the data
   int groupID = group_id.asInt();    
}   

for detail api, please refer the web site below:

http://www.working-dogs.com, but currentlly the web
site is not available.... try next time.



Hope can help you.

regards,

Kok Choon.

--- Gualberto Alejandro Sanchez Caceres
<gs...@itweb.com.mx> wrote:
> 
> once i execute the method "executeQuery()" this
> returns a Vector of
> Record objects and I don�t find the class Record in
> Turbine API. How can
> i obtain the values of the fields of my Query?
> 
> Thank's for your help!
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> turbine-user-help@jakarta.apache.org
> 


__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org