views:

13

answers:

1

I have a datagridview on a form with multiple columns. Three of the columns are expression columns. One column is subtracted from the second and the result is displayed in the third. Everything works great but when I hit the save button and save to the database, all the columns are saved to the database except the three columns used in the expression. They are NOT saved to the database. When I run the app in debug mode again the data in those 3 columns are gone. Is there something I am overlooking? How do you save expression data columns to the database?

A: 

Ditto to slugster's request for specifics.

Why do you want to save computed columns to the database, can't they just be computed again?

If you really must have this, (e.g. for audit purposes), I have a few hacks that you may consider

But they require knowing: * where the values are being computed (in the grid or in the select statement) * How complex the computations are. * what database you are using (i.e. are 'instead of' triggers available)

Rawheiser