Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Matt Slay
  Where is Matt Slay?
 Birmingham
 Alabama - United States
 Matt Slay
 Tags
Subject: Create collection of objects from cursor
Thread ID: 209443 Message ID: 209443 # Views: 5 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Sunday, December 28, 2008 10:27:57 PM         
   


Do you know of a technique that will create a collection of objects where each object in the collection represents a row from a cursor?

Basically, it would be like scattering a cursor to a collection of objects.

Example:

select * from ChildAlias;
where fkey=ParentAlias.pkey;
into cursor csrChildRecords

Then, (pseudo code):

scatter Cursor csrChildRecords to Collection collectionChildRecords

or a method call like CreateCollectionFromCursor('CursorName', 'CollectionName')

where the method would have a do/while loop that will create a collection, and then add an object to the collection for each row in the cursor.

Have you seen thee need or application of such an approach?

ENTIRE THREAD

Create collection of objects from cursor Posted by Matt Slay @ 12/28/2008 10:27:57 PM
RE: Create collection of objects from cursor Posted by mike castillo @ 12/29/2008 2:20:07 AM
RE: Create collection of objects from cursor Posted by tushar @ 12/29/2008 7:21:01 AM
RE: Create collection of objects from cursor Posted by Boudewijn Lutgerink @ 12/29/2008 9:04:40 AM
RE: Create collection of objects from cursor Posted by Cetin Basoz @ 12/29/2008 1:16:51 PM