Hello group
I have 2 table with ralation between 2 columns, i created 2 key and one relation between 4 columns. this is done because i wanted to create the child table row for each parent row and copy 2 columns of parent into child table.
when i see the database in a datagrid , it works perfectly , i can add new rows to parent table and the row adds to the child table and copies the 2 column. but when i update the dataset, only the parent table updates . if i add more information and fill more fields on the child table , it will save , but if dont , it wont save.
update commands are like this :
sqlDataAdapter1.Update(dataSet12,"PersonalInfo");
sqlDataAdapter2.Update(dataSet12,"Medication");
i have a dataset with 2 tables and each has 2 key and one relation between 2 table which relates the 2 by 2 columns. the keys are set as allownull , cuz i got some problem regarding adding new rows.
do you have any idea how to solve this problem or any idea how to do that?
ps. im using c# and mostly generated codes. maybe the problem is generated codes.
thanks
I have 2 table with ralation between 2 columns, i created 2 key and one relation between 4 columns. this is done because i wanted to create the child table row for each parent row and copy 2 columns of parent into child table.
when i see the database in a datagrid , it works perfectly , i can add new rows to parent table and the row adds to the child table and copies the 2 column. but when i update the dataset, only the parent table updates . if i add more information and fill more fields on the child table , it will save , but if dont , it wont save.
update commands are like this :
sqlDataAdapter1.Update(dataSet12,"PersonalInfo");
sqlDataAdapter2.Update(dataSet12,"Medication");
i have a dataset with 2 tables and each has 2 key and one relation between 2 table which relates the 2 by 2 columns. the keys are set as allownull , cuz i got some problem regarding adding new rows.
do you have any idea how to solve this problem or any idea how to do that?
ps. im using c# and mostly generated codes. maybe the problem is generated codes.
thanks