C
Chris Smith
Experienced Posters,
Couple of questions if you have time please.
Question 1
I have 2 tables in my db, the schema is exactly the same in each table.
There is only one record in each table. The one record in each table is
exactly the same. as well
Part Table with 1 record
ID = 1
UOM = EA
QTY = 40
Part Table 2 with 1 record
ID = 1
UOM = CT
QTY = 40
I pull these tables into 2 separate datatables, and create a dataset object.
At this point I add the first table using ds.tables.add table1. Then I merge
using ds.merge(table2, true, MissingSchemaAction.Add)
Now I have reviewed the merge documentation, and It says table is merged
into "current" table. What is the current table of a dataset object?????
Because if I add table1 to the dataset first, it should be the original, so
if I set the rowviewstate filter to modified original i should see UOM = EA,
but I see CT????? Not sure what is going on there.
Question 2.
Same tables, same data
Part Table with 1 record
ID = 1
UOM = EA
QTY = 40
Part Table 2 with 1 record
ID = 1
UOM = EA
QTY = 40
When I merge 2 datatables here I would expect to see 1 row, with a rowstate
of .unchanged, but I see 1 row with rowstate of modified.... If it was
modified during the merge, I don't see where?
Can anyone help me out with this one?
Thanks
Chris Smith
Couple of questions if you have time please.
Question 1
I have 2 tables in my db, the schema is exactly the same in each table.
There is only one record in each table. The one record in each table is
exactly the same. as well
Part Table with 1 record
ID = 1
UOM = EA
QTY = 40
Part Table 2 with 1 record
ID = 1
UOM = CT
QTY = 40
I pull these tables into 2 separate datatables, and create a dataset object.
At this point I add the first table using ds.tables.add table1. Then I merge
using ds.merge(table2, true, MissingSchemaAction.Add)
Now I have reviewed the merge documentation, and It says table is merged
into "current" table. What is the current table of a dataset object?????
Because if I add table1 to the dataset first, it should be the original, so
if I set the rowviewstate filter to modified original i should see UOM = EA,
but I see CT????? Not sure what is going on there.
Question 2.
Same tables, same data
Part Table with 1 record
ID = 1
UOM = EA
QTY = 40
Part Table 2 with 1 record
ID = 1
UOM = EA
QTY = 40
When I merge 2 datatables here I would expect to see 1 row, with a rowstate
of .unchanged, but I see 1 row with rowstate of modified.... If it was
modified during the merge, I don't see where?
Can anyone help me out with this one?
Thanks
Chris Smith