S
Sébastien
Hi,
I have a composed primary key (2 fields) in a table and I have a child
who have the 2 fields as foreign key. I created an expression column in my 2
tables to combine my 2 primary key fields in one (Column1 + ' ' + Column2).
In my VB form, I did my DataBinding as follow (on a ComboBox) :
DataSource = myDataSet
DisplayMember = String field from my parent table
ValueMember = Expression column from my parent column
SelectedValue = Expression column from my child table (the actual one)
When I do a myDataSet.Tables(ChildTable).CancelChanges(), it don't cancel
the change I did in my ComboBox. It only works when I do my DataBinding on a
field that already exists in my DataBase (I always do my DataBinding on
primary keys).
Maybe there is a better way to do what I am trying to do, so let me know if
you have a better solution.
Thank you for your help.
I have a composed primary key (2 fields) in a table and I have a child
who have the 2 fields as foreign key. I created an expression column in my 2
tables to combine my 2 primary key fields in one (Column1 + ' ' + Column2).
In my VB form, I did my DataBinding as follow (on a ComboBox) :
DataSource = myDataSet
DisplayMember = String field from my parent table
ValueMember = Expression column from my parent column
SelectedValue = Expression column from my child table (the actual one)
When I do a myDataSet.Tables(ChildTable).CancelChanges(), it don't cancel
the change I did in my ComboBox. It only works when I do my DataBinding on a
field that already exists in my DataBase (I always do my DataBinding on
primary keys).
Maybe there is a better way to do what I am trying to do, so let me know if
you have a better solution.
Thank you for your help.