I have written some code to manipulate data/records in a MASTER (order
header) and DETAIL (order details) tables.
What I have written is too extensive to post but essentially trying to:
1. Assign to a datarow (dr1) the first record of the MASTER table
2. Assign to another datarow (dr2) the second record of the MASTER table
3. If dr1.field1 = dr2.field1, then proceed, otherwise do stop
4. Assign to a third datarow (dr3) the first record of the DETAIL table
5. If dr2.field2 = dr3.field2, then delete record, otherwise repeat this
step till last record incrementing the datarow (dr3) for the DETAIL table .
What is happening is that dr3.field2 contains the value of dr1.field2! Some
how the values in the first datarow are ending up in the third datarow.
How could this be possible?
I have not set any relations between the tables as I do not believe it is
necessary
-
Brad
Sydney, Australia
header) and DETAIL (order details) tables.
What I have written is too extensive to post but essentially trying to:
1. Assign to a datarow (dr1) the first record of the MASTER table
2. Assign to another datarow (dr2) the second record of the MASTER table
3. If dr1.field1 = dr2.field1, then proceed, otherwise do stop
4. Assign to a third datarow (dr3) the first record of the DETAIL table
5. If dr2.field2 = dr3.field2, then delete record, otherwise repeat this
step till last record incrementing the datarow (dr3) for the DETAIL table .
What is happening is that dr3.field2 contains the value of dr1.field2! Some
how the values in the first datarow are ending up in the third datarow.
How could this be possible?
I have not set any relations between the tables as I do not believe it is
necessary
-
Brad
Sydney, Australia
Comment