Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Error post upgrade - Invalid use of Null
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Error post upgrade - Invalid use of Null

 Post Reply Post Reply
Author
Darryld View Drop Down
Newbie
Newbie


Joined: 10 June 2003
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Darryld Quote  Post ReplyReply Direct Link To This Post Topic: Error post upgrade - Invalid use of Null
    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))


Edited by Darryld - 29 January 2007 at 9:26pm
Back to Top
Darryld View Drop Down
Newbie
Newbie


Joined: 10 June 2003
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Darryld Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
MrMellie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 December 2006
Location: United Kingdom
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote MrMellie Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 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 Notice

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 at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

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