|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Typed DataSet RelationshipsI have 2 datatables on my typed dataset: 1) Reads all records form a table 2) Is a join query based on 3 tables Each one works perfectly on their own. I want to be able to set a relationship on one field in each datatable but when I change the record in datatable1, it doesn't reflect the change in datatable2 and I am guessing this is because datatable2 is based on a join query. An example of the data is below: DataTable1 Name Address SupplierID DataTable2 SupplierID Supplier I want to be able to select the Supplier in DataTable2 as the record changes in DataTable1. I tried setting a relationship between the 2 datatables on the typed dataset but it doesn't work. Is the only way around it to manually change the record in datatable2? TIA TigerMan,
A datarelation has not any relation to a Join :-). As well does a datarelation not take care of any update between tables. A relation is nothing more that it tells which Datatable (the rows in those) is the Parent for an other table (the rows in those) I hope this helps, Cor Show quote "TigerMan" <nospam@antispam.com> schreef in bericht news:emGXI4U%23GHA.4356@TK2MSFTNGP05.phx.gbl... > Hi, > > I have 2 datatables on my typed dataset: > > 1) Reads all records form a table > 2) Is a join query based on 3 tables > > Each one works perfectly on their own. I want to be able to set a > relationship on one field in each datatable but when I change the record > in datatable1, it doesn't reflect the change in datatable2 and I am > guessing this is because datatable2 is based on a join query. An example > of the data is below: > > DataTable1 > > Name > Address > SupplierID > > DataTable2 > > SupplierID > Supplier > > I want to be able to select the Supplier in DataTable2 as the record > changes in DataTable1. I tried setting a relationship between the 2 > datatables on the typed dataset but it doesn't work. > > Is the only way around it to manually change the record in datatable2? > > TIA > Hi Cor,
Thanks for that, I suspected as much. I will do it manually. Thanks again Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:uoTHLyX%23GHA.4388@TK2MSFTNGP02.phx.gbl... > TigerMan, > > A datarelation has not any relation to a Join :-). > > As well does a datarelation not take care of any update between tables. > > A relation is nothing more that it tells which Datatable (the rows in > those) is the Parent for an other table (the rows in those) > > I hope this helps, > > Cor > > "TigerMan" <nospam@antispam.com> schreef in bericht > news:emGXI4U%23GHA.4356@TK2MSFTNGP05.phx.gbl... >> Hi, >> >> I have 2 datatables on my typed dataset: >> >> 1) Reads all records form a table >> 2) Is a join query based on 3 tables >> >> Each one works perfectly on their own. I want to be able to set a >> relationship on one field in each datatable but when I change the record >> in datatable1, it doesn't reflect the change in datatable2 and I am >> guessing this is because datatable2 is based on a join query. An example >> of the data is below: >> >> DataTable1 >> >> Name >> Address >> SupplierID >> >> DataTable2 >> >> SupplierID >> Supplier >> >> I want to be able to select the Supplier in DataTable2 as the record >> changes in DataTable1. I tried setting a relationship between the 2 >> datatables on the typed dataset but it doesn't work. >> >> Is the only way around it to manually change the record in datatable2? >> >> TIA >> > > |
|||||||||||||||||||||||