Print Page | Close Window

Invalid use of Null: 'CBool'

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=19996
Printed Date: 11 April 2026 at 3:02pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Invalid use of Null: 'CBool'
Posted By: MortiOli
Subject: Invalid use of Null: 'CBool'
Date Posted: 23 May 2006 at 12:26pm
Hi Borg,
 
I've just noticed something that's happening with old old topics on my forum;
 
http://www.ckyalliance.co.uk/forum/forum_posts.asp?TID=5943&PN=1 - http://www.ckyalliance.co.uk/forum/forum_posts.asp?TID=5943&PN=1
 
Only the headers load, and none of the topic, with an error above saying (click the above link, and press CTRL+A to see the error);
 
Quote Microsoft VBScript runtime error '800a005e'

Invalid use of Null: 'CBool'

/forum/forum_posts.asp, line 827

Any ideas please?
 
Thanks



Replies:
Posted By: WebWiz-Bruce
Date Posted: 23 May 2006 at 4:41pm
This happens if you try and view a post that is deleted.

I have been working on a fix for the next release


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: MortiOli
Date Posted: 24 May 2006 at 9:17am

But these topics aren't deleted, and could be viewed fine in 7.x

Or do you mean the topics include posts that have been deleted?


Posted By: WebWiz-Bruce
Date Posted: 24 May 2006 at 10:26am
OK, I've looked into some more and found the line in question, in this case, reads in if a signature is to be shown in a post or not, by reading in the value from the field Thread.Show_signature in the database.

This field should be of the data type 'bit' so that it can be read in as a boolean.

Have a look in your database at this field to see if there are any un-usual entries and make sure it is set to the 'bit' data type.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: MortiOli
Date Posted: 24 May 2006 at 12:59pm
I've checked the table / fields, and Show_signature is set as bit.

What I've noticed is that Thread_ID 1 to 97584 has Show_signature as blank, and then 97585 - 114441 Thread_ID's has True or False in Show_signature.

I assume they should all be either True or False?

However, there are also the odd Thread_ID scattered amongst the blank Show_signature's with True or False set against them.


Posted By: WebWiz-Bruce
Date Posted: 24 May 2006 at 1:51pm
Have you moved from SQL Server 2000 to 2005?

If so then this could have happened when making the transfer as SQL server 2000 shows bits as 1 or 0 and SQL 2005 uses True and False


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: MortiOli
Date Posted: 24 May 2006 at 6:53pm
I'm not 100% sure, but yes, I think my host has recently upgraded.
 
Would you be able to write a quick script that I could run, to update the blanks to, for example, True, please?


Posted By: WebWiz-Bruce
Date Posted: 24 May 2006 at 10:17pm
Probally the simplest way is delete the field then recreate it setting the default value to 'False', as SQL server places the defeault value in the column for all records when you create a new column, Access doesn't do this.

This will recerate the column with false in all records. This will mean that signatures will not display in old messages but it will clear up the problem and new messages can still include signatures.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: MortiOli
Date Posted: 25 May 2006 at 8:55pm
I'd rather run a script if possible, to set all values to 'True'.

Could you advise on what SQL query would I need to run to update them?

I thought it would be the following;

UPDATE tblThread set Show_signature = True

But my host is coming back with a message, saying that the above throws up the following error;

Server: Msg 207, Level 16, State 3, Line 1
Invalid column name 'True'.


Posted By: WebWiz-Bruce
Date Posted: 26 May 2006 at 11:46am
Try:-

UPDATE tblThread set Show_signature = "True"

OR

UPDATE tblThread set Show_signature = 1

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: MortiOli
Date Posted: 26 May 2006 at 12:17pm
Originally posted by -boRg- -boRg- wrote:

UPDATE tblThread set Show_signature = 1
 
Perfect!  Thanks!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net