Forums

This topic is locked

TrackLogin Tutorial:UDNEWBIE.COM Now() problem

Posted 18 Feb 2002 11:59:47
1
has voted
18 Feb 2002 11:59:47 b w posted:
I want to insert the time either from client or server but it is giving me an error.

This is what appears in the Command from UD4.
INSERT INTO tblLogInTracking (UserID, LoggedIn)
VALUES (MMColParam, Now())

Name Runtime Value
==== =============
MMColParam Session("svLoginID"


This is the error I receive from my browser.

[Microsoft][ODBC SQL Server Driver][SQL Server]'Now' is not a recognized function name.

I am using sql 2000 server. The "loggedIn" datatype is datetime.

I have also tried 'datatime' instead of 'now' with no avail.

Any hints?

Replies

Replied 18 Feb 2002 17:25:09
18 Feb 2002 17:25:09 Viktor Farcic replied:
Easiest way is to use default value in DB. If you're using Access it's date() or now(). For SQL Server it's getdate().

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I want to insert the time either from client or server but it is giving me an error.

This is what appears in the Command from UD4.
INSERT INTO tblLogInTracking (UserID, LoggedIn)
VALUES (MMColParam, Now())

Name Runtime Value
==== =============
MMColParam Session("svLoginID"


This is the error I receive from my browser.

[Microsoft][ODBC SQL Server Driver][SQL Server]'Now' is not a recognized function name.

I am using sql 2000 server. The "loggedIn" datatype is datetime.

I have also tried 'datatime' instead of 'now' with no avail.

Any hints?


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager

Reply to this topic