DataBinding (one to one relationship)

  • Thread starter Thread starter Keith Kroculick
  • Start date Start date
K

Keith Kroculick

Hello,

I have a small Access database with 5 tables. I have
created a form in C# that I would like to bind to 2 tables
(Contacts & Categories). The categories table is more or
less a lookup table. Can anyone give me a small example on
how to bind 2 controls (textbox and combobox) to 2
different fields with these related tables (one to one
relationship). I know I need to create a datarelation
object but I can't seem to find a decent C# example
anywhere.

Thank You,

Keith
 
Keith,

1. Create a typed dataset with these two tables and a relation between them
2. Bind the text box to the "master" table by specifying the master table
name as the data member for the corresponding Binding class
3. Bind the combo box to the relationship by specifying
"<MasterTableName>.<RelationName>" as its data member.

I don't have an example but these should be the basic steps to start with.
 
Back
Top