SQL Server 2005
In brief: How can I update column "ParentID" with value "NULL"?
* I have a navigation menu here: http://www.coalcountryteam.org/
* The navigation menu has seven items, as you can see: Home, About Us, Media, etc.
* All of these seven "main navigation" menu items have ParentID = 0.
* Any database record that has ParentID = 0 gets included in this main navigation menu.
* I have built an update page that updates database records, and allows the user to set a ParentID and SortOrder for a record. It works well, except:
* The update page will not allow me to set ParentID = NULL.
* Some web pages should not
appear in the navigation menu; thus, they are not assigned a ParentID or a SortOrder; the value is NULL for these columns when a page should not appear in the navigation menu.
When I process the edit form, the OPTION VALUE = NULL gets updated as value "0" rather than NULL in the database. See the code, below. How can I get this SELECT form to update column ParentID with value NULL?
And, I bet there is a better way to do all of this. =) I welcome advice. Please let me know if I need to supply more information. Thank you for any advice.
<!--- use this select menu to display and assign Parent Page Titles --->
<!--- user should see a human-readable list of parent page titles --->
<cfselect size="8" name="ParentID" value="PageID" display="PageTitle" multiple="no" query="GetParents" queryPosition="below" selected="#selectedParents#" id="ParentID">
<option value="NULL"> <strong>Select Parent Page</strong> </option>
<!--- when form is processed, the correct ParentID is populated into tbl_acct_navigation --->
<!--- ParentID value NULL means the record / web page is not included in navigation menu --->