store calculated field

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
ahosny1
User
Posts: 12

store calculated field

Post by ahosny1 »

How can I store calculated field in ms-sql. Should I use server script on row inserted or row inserting ? any example code ?


motfs
User
Posts: 258

Post by motfs »

If the field is existing in database table and is in the same table, you can use the Row_Inserting server event to perform the calculation e.g.:

rsnew["<calculatefield>"] = <calculatedvalue>; // Replace <calculatevalue> with actual value, add double quote if it is a string.

Read Server Events and Client Scripts -> Row_Inserting in help file for more details.


Post Reply