RE: Is there any get column method?
RE: Is there any get column method?
- Subject: RE: Is there any get column method?
- From: "Tanmoy Roy" <email@hidden>
- Date: Wed, 14 Jul 2004 09:37:45 +0530
- Thread-topic: Is there any get column method?
Hi,
I think the following piece of code will solve the problem. My query uses the raw rows for fetching and it can select any number or rows specified by the specifier NEWVAL1 or NEWVAL2. You have to specify the exct syntax of the specifier during fetching.
String query=
"select <field_name1> AS NEWVAL1, <field_name2> as NEWVAL2 from <table_name> where <whereclause>";
NSArray results1 = EOUtilities.rawRowsForSQL(editingcontext,"<any-eomodel>", query);
if( results1 != null && results1.count() > 0)
{
for(int i=0;i<results1.count();i++)
{
id = (String)((NSDictionary)results1.objectAtIndex(i)).objectForKey("NEWVAL1").toString();
vecId.addElement(((NSDictionary)results1.objectAtIndex(i)).objectForKey("NEWVAL1"));
}
}
Thanks and Regards
Tanmoy Roy
Apple ACD Team
Infosys Technologies Limited - Bhubaneswar
* Ph: +91-674-2320001-50
* Extn: 2190
> ----------
> From: email@hidden on behalf of Kevin Xiaowen Ren
> Sent: Wednesday, July 14, 2004 4:23 AM
> To: email@hidden
> Subject: Is there any get column method?
>
> Hi,
>
> When I use EOQualifier, it's always return the whole raw from table.
> Is there any API to get column from table?
>
> Thanks,
>
> kevin
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.