You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by George Papastamatopoulos <Ge...@lawlex.com.au> on 2002/11/01 06:35:04 UTC
RE: [Fwd: Problem using raw SQL querries]
BasePeer.executeQueryString() will return a Vector of Village Record objects
You need to do something like
Vector results = BasePeer.executeQueryString()
for (Iterator i = rows.iterator(); i.hasNext(); )
{
Record item = (Record)i.next();
String myValue = item.getValue("MY_COLUMN_NAME").asString();
Long myLongVal = item.getValue("MY_LONG_COLUMN_NAME").asLongObj();
etc...
}
george
-----Original Message-----
From: apdas [mailto:apdas@iitk.ac.in]
Sent: Saturday, 2 November 2002 2:55 AM
To: Turbine User
Subject: [Fwd: Problem using raw SQL querries]
Hi friends,
My problem is not regarding executing raw SQL querries.My real problem
is how to retrieve value of individual elements using foreach syntax (
or some other means)
Please help me.
Regards,
A.P.Das
-------- Original Message --------
Subject: Problem using raw SQL querries
Date: Fri, 01 Nov 2002 10:35:40 -0500
From: apdas <ap...@iitk.ac.in>
Organization: IIT Kanpur
To: Turbine User <tu...@jakarta.apache.org>
Hi friends,
I am using raw SQL querries to retrieve a row set.
My query looks like this.
Vector v=BasePeer.executeQuery("select * from TURBINE_GROUP where
GROUP_NAME='global'");
I want to retrieve values of individual elements from this vector.
But when I use foreach syntax I get the total row set.
My result looks like this
{'1','global','null'}
How do I retrieve individual elements from this ?
I donot want to use peers.
Please help me.
Regards,
A.P.Das.
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [Fwd: Problem using raw SQL querries]
Posted by apdas <ap...@iitk.ac.in>.
Thanks George,
But Could you please let me know what is this Record class and where
will I get this class ?
Regards,
A.P.Das.
George Papastamatopoulos wrote:
>
> BasePeer.executeQueryString() will return a Vector of Village Record objects
>
> You need to do something like
>
> Vector results = BasePeer.executeQueryString()
> for (Iterator i = rows.iterator(); i.hasNext(); )
> {
> Record item = (Record)i.next();
>
> String myValue = item.getValue("MY_COLUMN_NAME").asString();
> Long myLongVal = item.getValue("MY_LONG_COLUMN_NAME").asLongObj();
>
> etc...
> }
>
> george
>
> -----Original Message-----
> From: apdas [mailto:apdas@iitk.ac.in]
> Sent: Saturday, 2 November 2002 2:55 AM
> To: Turbine User
> Subject: [Fwd: Problem using raw SQL querries]
>
> Hi friends,
>
> My problem is not regarding executing raw SQL querries.My real problem
> is how to retrieve value of individual elements using foreach syntax (
> or some other means)
>
> Please help me.
>
> Regards,
> A.P.Das
>
> -------- Original Message --------
> Subject: Problem using raw SQL querries
> Date: Fri, 01 Nov 2002 10:35:40 -0500
> From: apdas <ap...@iitk.ac.in>
> Organization: IIT Kanpur
> To: Turbine User <tu...@jakarta.apache.org>
>
> Hi friends,
>
> I am using raw SQL querries to retrieve a row set.
>
> My query looks like this.
>
> Vector v=BasePeer.executeQuery("select * from TURBINE_GROUP where
> GROUP_NAME='global'");
>
> I want to retrieve values of individual elements from this vector.
> But when I use foreach syntax I get the total row set.
>
> My result looks like this
>
> {'1','global','null'}
>
> How do I retrieve individual elements from this ?
>
> I donot want to use peers.
> Please help me.
>
> Regards,
> A.P.Das.
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>