Mike --

Basically what you want to do is this:

c4_StringProp pZip("zipCode");
c4_StringProp pLastName("lastName");

c4_Storage store("mystore.db",true);
c4_View v = store.GetAs("addresses[zipCode:S,lastName:S]");
c4_View vs = v.Select(pZip["20005"] + pLastName["Skrzpzcak"]);

This will create a view vs that will have only records that match the
values "20005" and "Skrzpzcak".  Keep in mind that this is a virtual
view, so you can't remove records from it.  If you want to remove the
records, you need to do something like v.RemoveAt(v.GetIndexOf(vs[0]))
to dereference the first record of vs into the base view v.

Hope this helps.

jeffrey kay 
personal weblog <www.k2.com>
pgp key <www.k2.com/keys.htm>

"first get your facts, then you can distort them at your leisure" --
mark twain 
"if the person in the next lane at the stoplight rolls up the window and
locks the door, support their view of life by snarling at them" -- a
biker's guide to life
"if A equals success, then the formula is A equals X plus Y plus Z. X is
work. Y is play. Z is keep your mouth shut." -- albert einstein


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]] On Behalf Of Michael Skrzypczak
> Sent: Monday, January 06, 2003 3:52 PM
> To: [EMAIL PROTECTED]
> Subject: [Metakit] I'm clueless - using a "Select"
> 
> 
> 
> I'm trying to figure out how to use the C++ interface to 
> metakit to do 
> retrieve a set of rows that match multiple criteria.
> 
> I've looked through the documentation I can find - including 
> the TCP primer, 
> and it looks like I should use the .Select call off of the 
> c4_View object.
> 
> The select call takes a const c4_RowRef & object. How do I 
> create this 
> object?
> 
> For example, if I have a view with "lastName" and "zipCode" as 
> properties...and I want to find the set of last names with a 
> specific zip 
> code, how do I do this?
> 
> A code snippet would be wonderful if anyone could point me to one!
> 
> Tia,
> Mike Skrzypzcak
> 
> 
> 
> 
> 
> 
> 
> 
> _________________________________________________________________
> The new MSN 8 is here: Try it free* for 2 months 
> http://join.msn.com/?page=dept/dialup
> 
> _______________________________________________
> metakit mailing list  -  [EMAIL PROTECTED]
> http://www.equi4.com/mailman/listinfo/metakit
> 

_______________________________________________
metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to