I just tried the following on CFMX with SS2K ...
<cfquery name="login" datasource="#REQUEST.DSN#">
INSERT INTO tblUsers (
Username,
Email,
IndustrySectorID,
LoginTime
) VALUES (
'adrian',
'[EMAIL PROTECTED]',
2,
#CreateODBCDateTime(Now())#
)
</cfquery>
and...
<cfquery name="login" datasource="#REQUEST.DSN#">
INSERT INTO tblUsers (
Username,
Email,
IndustrySectorID,
LoginTime
) VALUES (
'adrian',
'[EMAIL PROTECTED]',
2,
<cfqueryparam cfsqltype="CF_SQL_TIMESTAMP"
value="#CreateODBCDateTime(Now())#" />
)
</cfquery>
and ...
<cfquery name="login" datasource="#REQUEST.DSN#">
INSERT INTO tblUsers (
Username,
Email,
IndustrySectorID,
LoginTime
) VALUES (
'adrian',
'[EMAIL PROTECTED]',
2,
<cfqueryparam cfsqltype="CF_SQL_DATE"
value="#CreateODBCDateTime(Now())#" />
)
</cfquery>
all when in ok. Try out TIMESTAMP see if that works. Silly question, but
what datatype is the column? datetime or varchar?
-----Original Message-----
From: Damian Watson [mailto:[EMAIL PROTECTED]
Sent: 11 November 2003 17:41
To: [EMAIL PROTECTED]
Subject: Re: [ cf-dev ] cfprocparam and dates
Nope, I get the same error when I put the date in statically...
----- Original Message -----
From: "Adrian Lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 11, 2003 5:35 PM
Subject: RE: [ cf-dev ] cfprocparam and dates
> I've always stayed away from CreateODBCDateTime() so I'm not sure what's
> happening with that.
>
> Does the SP run ok when you call it from QA and pass in {ts '2003-11-11
> 17:07:29'}?
>
> -----Original Message-----
> From: Damian Watson [mailto:[EMAIL PROTECTED]
> Sent: 11 November 2003 17:13
> To: [EMAIL PROTECTED]
> Subject: Re: [ cf-dev ] cfprocparam and dates
>
>
> well.... I'm wondering whether the problem is in using the "where date >"
> part of the statement:
>
> CREATE PROCEDURE getEvents
> @d_dateNow datetime
> AS
> SELECT EventID,Title,ShortSummary,EventDate
> FROM ContentEvents
> WHERE EventDate > @d_dateNow
> ORDER BY EventDate
> GO
>
> ...the date var is created thusly: <cfset
> request.d_dateNow="#CreateODBCDateTime(now())#">
>
> (Adrian, prints out {ts '2003-11-11 17:07:29'} )
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]