Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - Access to MsSql – Receives Invalid use of Null
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Access to MsSql – Receives Invalid use of Null

 Post Reply Post Reply
Author
Andreas.E View Drop Down
Newbie
Newbie


Joined: 12 October 2006
Location: Norway
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andreas.E Quote  Post ReplyReply Direct Link To This Post Topic: Access to MsSql – Receives Invalid use of Null
    Posted: 03 April 2008 at 8:46am

Hi

I have recently convert my Access DB up to MsSql and done the necessary changes to connect to the SQL DB. All that, went just fine.

The forums, and topics are fully readable, but are not able to post anything. When I press “Post” I end up with the following error:

 
Microsoft VBScript runtime error '800a005e'

Invalid use of Null: 'CBool'

/_forum_beta/forum_posts.asp, line 310

Any help is much appreciated Clap


Small update
The error only occurs when posting a new topic in any forum. Reply in already existing topic, works fine.

Line 310 in forum_posts.asp:
    'Read in the topic details
    lngPollID = CLng(rsCommon("Poll_ID"))
    strSubject = rsCommon("Subject")
    strTopicIcon = rsCommon("Icon")
    blnTopicLocked = CBool(rsCommon("topicLocked"))
    intPriority = CInt(rsCommon("Priority"))

-----
FUNCTION OF CBool
Description
Returns an expression that has been converted to a Variant of subtype Boolean.
Syntax
CBool(expression)

The expression argument is any valid expression.

Remarks
If expression is zero, False is returned; otherwise, True is returned. If expression can't be interpreted as a numeric value, a run-time error occurs.

-----




Edited by Andreas.E - 03 April 2008 at 10:00am
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9791
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 03 April 2008 at 10:08am
The only line calling CBool from there is:-

blnTopicLocked = CBool(rsCommon("topicLocked"))

Seems odd that you are getting this error, often strange errors are a result of corrupted files. The first thing to try is to try reuploading the original files again and see if that fixes the issue.
Back to Top
oorubenoo View Drop Down
Newbie
Newbie
Avatar

Joined: 22 December 2011
Location: Florida
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote oorubenoo Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2016 at 10:10pm
Since i'm running into the same error I  unsimplified CBOOL and put it into a If Else statement. Worked for me.


If isNull(rsCommon("topicLocked")) Then
blnTopicLocked = 0
Else
blnTopicLocked = rsCommon("topicLocked")
end if

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.07
Copyright ©2001-2024 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2024 Web Wiz Ltd. All rights reserved.