Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Join or relate vfp tables prior to putting in dataset
Message
 
To
04/03/2010 08:47:26
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
ASP.NET
OS:
Windows 7
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01452459
Message ID:
01452628
Views:
24
>Neil,
>
>>HI,
>>
>>Would someone please show me how to perform a vfp datatable query, via a business object function (C# please), that relates two tables prior to putting the result of the query in the dataset.
>>
>>I have an appointments data table and a patients data table. The appointments table is small with PK = ID, FK=patientID. The patient data table is huge with PK=patientID.
>>
>>Sure, I can bring over the 2 tables and then do the join in the dataset or set up a relation once in the dataset is filled with the 2 tables. But.... I would like to limit the size of the patient table query. This seems so simple in native VFP (set relation to or a select with join) but I am having trouble wrapping my mind around it in MM.NET.
>>
>>Thanx,
>>Neil Gorin
>
>I don't have any examples of this to provide you but you do not have to retrieve all the data in order to have relational data. You should be able to retrieve your appointment data and then retrieve the related patient data. If you retrieve this data already joined as in a query you will likely run into problems if you want to update this.
>
>The recommended way would be to retrieve your appointment data and then retrieve the related patient in a seperate business object. That said, since I don't know what you are trying to achieve I can't say I am giving you good advice or if it is valid for your situation.
>Tim
Just to add a bit to Tim's advice. If you want to bring over one dataset with both patient and appointment data, it shouldn't be a problem to update only the appointment biz object. I have a few tables where I want to show a patient name along with other child data. I just include the name data as part of the dataset but the save only picks up the columns for the child biz object. I don't think you could do updates to the parent table this way without causing problems because you would have duplicate keys.
Linda Harmes
HiBit Technologies, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform