Ask a Question related to Dreamweaver AppDev, Design and Development.
-
GP3000 #1
Option Value = NULL
I have a drop down box with several selections that when submitted, update a
SQL Server backend database. I'd also like to have an option in the drop down
box that allows me to pass a NULL value back to the database. A sort of
"reset" if you will.
I've tried the code below, but it just writes the word "NULL" to the
database...not actually a <NULL> value.
<select name="select">
<option value="NULL">No Value</option>
<option value="1">Bill</option>
<option value="2">Chris</option>
<option value="3">John</option>
</select>
Any help would be greatly appreciated!! Thanks!!
GP3000 Guest
-
env Config option and LockDetect option not working with Berkeley DB RPC
I am currently using Berkeley DB 4.4.20 with Berkeley DB perl module 0.28. I am running the client/server version of Berkeley DB. Here is what my... -
NULL NULL Error
I have run out of things to check for and could use some help. We are on a unix box, CFMX 7, and have started to use the CFDOCUMENT tag. The tag... -
"null null" error on line -1
Hi, A different, new, ocasional error this time. Since we are using CFMX7, occasionally we get this error: " Application Exception Monitor... -
Error: ?null? is null or not an object
eloine: That is a bogus error message in that it probably refers to something you have done (or not done) on the page. So, looking in the... -
How to ensure if column A is null, column B has to be null
Thank you Delbert! -
Brandon Taylor #2
Re: Option Value = NULL
<option value="">No Value</option>
"GP3000" <webforumsuser@macromedia.com> wrote in message
news:d3m2dh$n6v$1@forums.macromedia.com...>I have a drop down box with several selections that when submitted, update
>a
> SQL Server backend database. I'd also like to have an option in the drop
> down
> box that allows me to pass a NULL value back to the database. A sort of
> "reset" if you will.
>
> I've tried the code below, but it just writes the word "NULL" to the
> database...not actually a <NULL> value.
>
> <select name="select">
> <option value="NULL">No Value</option>
> <option value="1">Bill</option>
> <option value="2">Chris</option>
> <option value="3">John</option>
> </select>
>
> Any help would be greatly appreciated!! Thanks!!
>
Brandon Taylor Guest
-
GP3000 #3
Re: Option Value = NULL
I've tried this solution to no avail...it does not actually pass a NULL value
back to the database...the record is actually updated with a "space". So if
you query on the table for all NULLs, the record does not come back. If you
query on a "space" it comes back.
GP3000 Guest
-
Unregistered #4
Re: Option Value = NULL
Hi, what you can do is set a default value like "0" then before updating the database, make an IF Statement that checks for that "0", then replace it with NULL.
It's something like: <option value="0">No Value</option>
then before updating the database (this is just pseudo-code, modify as needed):
noValue = dropdownlist.value;
if (noValue == "0")
{
noValue = null;
}
Then, update database. You may need to replace the "null" to a null SQL type of the programming language that you're using.
Hope you pull it off!
DissoUnregistered Guest



Reply With Quote

