On Thu, Jul 17, 2008 at 2:26 PM, Paul Hill <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I've been thinking about n-tier design...
>
> I have a business class.  This class has properties for all the
> underlying database fields.
> There's a method called GetByID() that fetches 1 record based on the
> PK for that table.
>
> Great.  I can update the properties and call Save() which sends an
> update to the SQL table.
>
> But suppose I want to search for a range of records.
> So I have a method called GetBySurname() that can return multiple
> records.  This method returns a Recordset/array/SqlDataReader etc.
>
> But this doesn't really 'fit'.  The business object represents 1 record.
>
> What's a nice solution?
> One way would be to implement SkipNext() & Eof() methods that let you
> move through the data, but sometimes I want a Recordset if I'm passing
> the data to a grid.
---------------------------------------------

Ever thought about a container object for your individual objects?
You could say Cursor, I say list.

-- 
Stephen Russell
Sr. Production Systems Programmer
Mimeo.com
Memphis TN

901.246-0159


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to