Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
N-tier examples
Message
From
18/11/2004 17:23:44
 
 
To
18/11/2004 17:00:14
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00962825
Message ID:
00962851
Views:
8
>I would make a single DLL for all the data and have separate methods for getting to the data. You could have one class per table if you wanted.
>
>I would also use SQL SELECTs. IMO, it makes the passing of data easier and you want to pass the actual data around, not record numbers, etc. Use CURSORTOXML and XMLTOCURSOR to make data passing easy.
>
>I use methods for standard lookup stuff: GetCustomerByNumber(CustNo), GetCustomerByPhone(PhoneNo), GetCustomerByName(LastName, FirstName), etc. For generic queries, I use GetCustomerByCustom(where clause) or a similarly named method. Pass in just the parts of the WHERE clause of the SQL SELECT.
>
>
>>Ok, my quest to make a small COM+ example has begin to grow out of control slightly. I'm looking for guidelines on the data layer. I'm thinking to make a component for each table, that would handle access to that table: Creating, finding, deleting, or updating records in the table.
>>

Thanks Craig,

I intend to use a single DLL for all the data, as you suggest, and I intended to create a class per table. It was just the details of getting at the data and passing it around that were starting to stump me. :)

> GetCustomerByNumber(CustNo) - ah. this is what I had in mind initially, and adding your idea of the 'custom' one as a catch-all sounds pretty good.

Thanks again,

What do you think about Updating, in terms of a given class? My example updates a single field, but I'd like to update whatever needed updating in the record, so to speak.
Jim Newsom
IT Director, ICG Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform