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?

Recommended Answers

All 3 Replies

>How do you save expression data columns to the database?

Nope. But you can create an expression column in database or create a VIEW.

Huh? create a view? I don't understand.

>Huh? create a view? I don't understand.

Create or Replace View TestView select No1, No2, No1 +  No2 as Expression1 from tableName
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.