| Author |
Topic Search Topic Options
|
wnypa
Newbie
Joined: 16 November 2004
Status: Offline
Points: 13
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
dj air
Senior Member
Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
wnypa
Newbie
Joined: 16 November 2004
Status: Offline
Points: 13
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
wnypa
Newbie
Joined: 16 November 2004
Status: Offline
Points: 13
|
Post Options
Thanks(0)
Quote Reply
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. 
|
 |
dj air
Senior Member
Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
|
Post Options
Thanks(0)
Quote Reply
Posted: 04 February 2005 at 4:27pm |
no problem, ill remember that if someone else asks about it.
|
 |
iSec
Senior Member
Joined: 13 February 2005
Status: Offline
Points: 1140
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
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.
|
|
|
 |
sfd19
Senior Member
Joined: 20 December 2004
Status: Offline
Points: 263
|
Post Options
Thanks(0)
Quote Reply
Posted: 13 February 2005 at 7:14am |
-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:
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. 
|
|
|
 |