store operator as a variable
Is it possible to store operators in a field of an sql table and then use this value to calculate figures in asp .net.
For example if the field in the database was "+" then it would add two figures, if it was "-" then it would subtract on from the other.
Re: store operator as a variable
You'd have to get the operators from the database but you'd be using if...then or switch statements to call the appropriate line of code.
Re: store operator as a variable
cheers, this is what im doing at the moment, I would have liked to assign the opertor to a variable so i didnt have to chnage the select case whenever a new calculation was added. Thanks anyway