Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
There's got to be an easier way to sync two tables
I was looking at the example in the manual "Synchronizing Data Bound User Interface Controls" and it seems that this is more code than is needed to sync a control.
I have an Equipment table that has a field, FacilityId (integer), that I want linked to another table, Facilities with an Id (integer) field that is the key field, so that as I navigate the Equipment table, the text box on the form will show the name in the Facility table:
Equipment
FacilityId --> Facilities.Id
On my form is a text field that is bound to the Name field in the Facilities table.
FacilityName.Text --> Facilities.Name
But I can't get this to work simply.
I have already created a routine when a row's data is 'Retrieved' I save the Id and then use a Select command to get the Facility's name. This too seems like overkill.
This is so easy in FoxPro by just relating the the two tables.
Any idea's as to how to do this?
Thanks.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement