I added the field "Hide" into the tblThreads post and set it's value to "o" (at least for testing. It is a "bit" field. At first I couldn't get into the hidden fields section because the field didn't exist. Now it shows up and it will say that there are no hidden post to view. So that works fine.
But when trying to view topics now, I am getting:
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'CBool'
/forum_temp/forum_posts.asp, line 779 |
I know it has to deal with a boolean value, but what should I set the field values to to correct this?
This is the code the error is calling attention to
blnHidePost = CBool(sarryPosts(5,intCurrentRecord)) |
In the documentation, the changes given to the database are:
Changes to tblThread New fields:- 1. Hide - data type = true/false - default value = false 2. File_uploads - data type = text 255 characters |
But there is no "true/false" datatype in SQL Server. I saw in the "msSQL_server_update.asp" file what to set it as and I did, but I get this error trying to update the SQL Server field:
'tblThread' table - Unable to modify table. ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'Hide', table 'mocha_db.dbo.Tmp_tblThread'; column does not allow nulls. INSERT fails. [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated. |
Another thing I've noticed is that I can add new content to the database. I just can't pull up the old content when I click on a forum topic. So what I think it is is simply that it is not adding the default value to the tblThreads table in each field, but it is adding it to new post.
How can I give all of the fields the default value in the actual table?
Edited by imhotep - 06 August 2006 at 7:02pm