Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Saving computed columns to database

Author  Topic 

token
Posting Yak Master

133 Posts

Posted - 2006-02-19 : 16:39:47
Hi All,

I have been having a problem that I assume most people would face when making a front-end for a database. I am using Visual C# 2005 and SQL Server 2005.

I added an unbound column called 'Extended' to a table in my Dataset table which performs a calculation for sales tax. The result of my calculation is fine and it displays correctly on my Form.

However, how do I save the value in the computed column back to my database? Essentially I want the value in the 'Extended' computed column to be saved into a column in my database table called 'PriceIncTax'.

Lets say that I don't bother to store the 'Extended' computed column value back to the database i.e. the calculation is done on the Form in real-time. Then if another user on a different machine wants to see how much the price is for a product, his machine won't display the 'PriceIncTax' because it was never stored to the database. It will just return NULL.

I cannot find the answer to my questions anywhere! I've looked in various books and even googled it.... hence I ended up here.

Thanks in advance for your suggestions.

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2006-02-19 : 18:23:07
Cross post

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=62020

Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson
Go to Top of Page
   

- Advertisement -