开发者

How to save an expression datacolumn to the database?

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开发者_JAVA百科 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?


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜