Last post May 16, 2007 02:48 PM by darkknight187
May 15, 2007 10:09 AM|darkknight187|LINK
So here's the problem, and maybe one of you guys have come across something similar.
At first, I could create an ad with a text box that the user may not have any information for, and could leave it blank.
When it was submitted it would enter nothing into the column, no NULL, Nothing.
The problem was when I would test it in the update ad page, and add something to that column it would add it and if I went back in to update it, and just deleted what I wrote, then it would delete it and insert a "NULL". Once the NULL was inserted it would
throw an error if you wanted to update your ad.
"Can not convert DBNULL to String"
It would do this even though I had that column accepting NULLs. So I told it not to accept NULLs and now if you delete the text, while in the update page, it will NOT do anything.
I can change the text, but not delete it entirely.
I was trying to make an if statement to enter a default phrase or something.
But no such luck.
So if anyone has any ideas I would greatly appreciate it.
May 16, 2007 02:48 PM|darkknight187|LINK
For anyone else having the same problem, I found an answer.
As always it was really simple.
At the bottom of the Editad page is code for each of your columns.
All I had to do was add "Default Value=" like so.
Now I got my blank space, or anything I want it to default to if left blank.
Gotta love the too easy ones.