Problem with expression's datacolumn after AcceptChanges

A

Adry

Hi,

I've a datatable on wich I add a datacolumn based on an expression.

If I load the datatable from an XML File (each row's state is Added),
cicling throw rows I can see the expression's datacolum value, but if I call
the AcceptChanges method after loaded (eachrow's state changes to Unchanged)
I can't see the expression's datacolumn (always DBNull value in it).

Someone can help me ?


Thanks

Adriano
 
H

Hussein Abuthuraya[MSFT]

Adriano,

Are you saying that if the RowState is Unchanged then all values in Expression column will be DBNull!

Can you provide a step-by-step scenario where we can see this behavior?


Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
 
A

Adry

Sorry,

my explanation was incomplete.

Infact the Expression column is in relation with another datatable.

While the two datatables have rows in state "Added", the value of expression
column is OK, but after I call the AcceptChanges on first datatable (rows
changing to "Unchanged") the expression column is DBNull.


Thanks

Adriano


Hussein Abuthuraya said:
Adriano,

Are you saying that if the RowState is Unchanged then all values in
Expression column will be DBNull!
Can you provide a step-by-step scenario where we can see this behavior?


Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
 
K

Kevin Finke

All,

I'm going to jump into this thread and add another twist. I have column
expressions defined in my XSD for my typed dataset. When I get my data from
the middle tier (using a merge), the expression columns start off DBNull.
However, if I update a value in a row and move off of the row, the
expression columns calculate correctly. I have both expressions which are
simply lookups from a parent table as well as simple math expressions which
sum columns within the same table, and both types of columns exhibit the
same behavior.

What is the best method to force the expression columns to recalculate?

Kevin Finke
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top