Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Cdate error after migration
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Cdate error after migration

 Post Reply Post Reply Page  123 4>
Author
wnypa View Drop Down
Newbie
Newbie


Joined: 16 November 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote wnypa Quote  Post ReplyReply Direct Link To This Post Topic: Cdate error after migration
    Posted: 03 February 2005 at 2:58pm
After migrating from sql to access manually, I get this error everytime a new user posts, I've narrowed it down to it not posting the joined date in the access database, If i manually enter it, the problem goes away. 
-=error=-
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'CDate'

/forum/forum_posts.asp, line 645
/-=error=-
a simelar message appears in a PM from the same new user(since the migration).
 
I had some other issues with nulls in the database i fixed them by setting the default value to 0. but this problem remains.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 03 February 2005 at 6:14pm
please search the forum as this has been gone over many , many times.

im not sure but i think it was to do with te LCID .

have the miogration changed to a different part of the word, server completely.. also this is discussed within the documentation that comes with the forum.
Back to Top
wnypa View Drop Down
Newbie
Newbie


Joined: 16 November 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote wnypa Quote  Post ReplyReply Direct Link To This Post Posted: 04 February 2005 at 3:47pm
The LCID is the same, and the server has not changed, I believe this not to be a region issue.
 
I have looked at both common.asp files old and new and both are set to 'Session.LCID = 1033  This is hosted by me, and I haven't changed regions.
 
I check the format of the cell in the new access database, and it appears to be the same format as the old.
 
I've gone through all the old posts with a cdate error. I only get the error when the page has to post the joined date. which is null, because when they joined it didn't post the date to the new database.
Back to Top
wnypa View Drop Down
Newbie
Newbie


Joined: 16 November 2004
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote wnypa Quote  Post ReplyReply Direct Link To This Post Posted: 04 February 2005 at 4:23pm
Problem Solved!!!
 
Default value was missing in the database (again) changed to "now()"
and all is well again... I hope this helps someone in the future migrating from SQL to Access.
 
 
Thanks for the Ideas from moderators.Clap
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 04 February 2005 at 4:27pm
no problem, ill remember that if someone else asks about it.LOL
Back to Top
iSec View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 February 2005
Status: Offline
Points: 1140
Post Options Post Options   Thanks (0) Thanks(0)   Quote iSec Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 12:27am
Hello guys,
 
Please help me overcome the above error as I am facing it now after migrating from MS SQL to MS Access, where do I start and what to fix? Thanks for your time.
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: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 4:51am
The CDate error on the forum_posts.asp page is usually cousred by the edit date, if the post has been edited.

The problem comes when changing servers etc. from a server that uses a period (.) in decimal numbers and those servers that use (,) in decimal numbers eg:-

123456.55
123456,55

If you have access to the server, changing the servers settings to use (.) instead of (,) or vise versa would sortout this issue.
Back to Top
sfd19 View Drop Down
Senior Member
Senior Member


Joined: 20 December 2004
Status: Offline
Points: 263
Post Options Post Options   Thanks (0) Thanks(0)   Quote sfd19 Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 7:14am
Originally posted by -boRg- -boRg- wrote:

The CDate error on the forum_posts.asp page is usually cousred by the edit date, if the post has been edited.

The problem comes when changing servers etc. from a server that uses a period (.) in decimal numbers and those servers that use (,) in decimal numbers eg:-

123456.55
123456,55

If you have access to the server, changing the servers settings to use (.) instead of (,) or vise versa would sortout this issue.
Without server acces he can use this:
 
Originally posted by sfd19 sfd19 wrote:

We had the same problem after switching from an American server to a German server and then back to an American. It was annoying
 
Right before this line in /functions/functions_format_post.asp
 
If isNumeric(dtmEditedDate) Then dtmEditedDate = CDate(dtmEditedDate) Else dtmEditedDate = 0
 
add a new line.
 
When your server is using "." in the date format (eg German servers) then add
dtmEditedDate = Replace(dtmEditedDate,",",".")
or when your server is using "," in the date format (eg American servers) then add
 
dtmEditedDate = Replace(dtmEditedDate,".",",")
 
When you are not sure what format your current server is using then check for a message in your database that has been edited with the current server settings and see if that server is using "," or "." in the number of the edited date. Then apply the fitting code line from above.
 
That should help.
 
 
 
On a personal note, Borg, I would really recommend that you create a closed sticky here where you add the solutions to the main problems that are getting asked about 3 times here every week.
 
'Admin password', 'Login problem', 'CDate', 'Group/member permissions' , 'Email setup', 'free hosts' and more, all of it has been asked and answered a hundred times here.
You could save yourself a lot of time by creating a closed 'Your problem gets solved here!'-sticky, then add the solutions to the main problems, then a link to the WWF FAQ and then a link to the search button that seems to be so hard to find.
 
Just a suggestion. Wink
 
Politics, economy & social issues: StudentsforDemocracy.net
Back to Top
 Post Reply Post Reply Page  123 4>

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.