Print Page | Close Window

Error post upgrade - Invalid use of Null

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=22556
Printed Date: 08 April 2026 at 6:34am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Error post upgrade - Invalid use of Null
Posted By: Darryld
Subject: Error post upgrade - Invalid use of Null
Date Posted: 29 January 2007 at 9:25pm
Hi,
 
I get the following error after upgrading a 7.x forum using the access upgrade utility. Everything seem to work completely fine locally. But after upgrading my live site I realise I didnt test posting a message... doh.
 
I guess from other posts something may have gone wrong with the DB upgrade.
 
Help! Error below.
 
Darryl
 
Microsoft VBScript runtime (0x800A005E)
Invalid use of Null: 'CLng'
/forum/forum_posts.asp, line 755
 
Relevant line of code
 
  'Read in threads details for the topic from the database
  lngMessageID = CLng(sarryPosts(0,intCurrentRecord))



Replies:
Posted By: Darryld
Date Posted: 29 January 2007 at 10:32pm
I've figured out my problem. The access database I was using originally had become corrupted. I managed to export the data out using SQL server 2005 integration services into a fresh copy. This lost the primary key information and autonumbering.
 
Access doesnt want to put an autonumber back on existing data. I also cant re-import the data into an autonumber field.
 
Anyone got any ideas of a way around this?
 
Cheers
Darryl


Posted By: MrMellie
Date Posted: 30 January 2007 at 10:48am
Can you not just set the field in SQL as an identity field? You should be able to, either with Enterprise Manager if you have access to it, or via some T-SQL script.



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