DataSet.Merge and Column.Expression

  • Thread starter Thread starter tomb
  • Start date Start date
T

tomb

Scenario:

Table T1 with n columns and 2 columns with expression
Table T2, T1 close without 2 columns with expression

DataAdapter.Fill(T2);

T1.DataSet.Merge(T2, false, MissingSchemaAction.Ignore);

The value of columns with expression (in T1 table) is null

I am wrong or it's a bug?

Workaround:

after the merge I re-set the expression

foreach (DataColumn C in T1.Columns) {
if (C.Expression!="") C.Expression = C.Expression;
}
 
tomb said:
Scenario:

Table T1 with n columns and 2 columns with expression
Table T2, T1 close without 2 columns with expression
^^^^^
sorry, T2 is a T1 clone.


tomb
 
This is a know issue being fixed in V2 of the frameworks.

The work around (not really much of one) is to manually update the columns
for the expressions after the merge is complete.

Andrew Conrad
Microsoft Corp
 
Back
Top