Dan

Dan

  • NA
  • 16
  • 0

ISNULL question

Oct 5 2007 1:54 AM
Im a little confused about the proper way of using the ISNULL feature, or if it can be used at all for variables. Im having an issue relating to user input from a form stored in a session variable as well as other strings in the session. Its an address form and when the user doesnt enter anything in the input obviously the value stored is a null. Ocassionally I get a Sql server exception error saying I cant have a null value. I know which line of code causes this error but Im not sure how to fix it. I need a way to handle the null values but inserting some other value into the variable so it cant be null. So something like "IF textboxValue = NULL make textBox value 0". Thats not code obviously but thats the kind of thing Im trying to do. If anyone can lend some advice for me I'd seriously appreciate it because this is keeping people from ordering from me when the error happens. Thanks in advance!

Answers (5)