Results 1 to 3 of 3

Thread: store operator as a variable

  1. #1

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    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.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  3. #3

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width