Check the cfsqltype value you are using (CF_SQL_TIMESTAMP rather than
CF_SQL_DATE)

<cfqueryparam cfsqltype="CF_SQL_TIMESTAMP"
value="#CreateODBCDate(Now())#"/>

Is is not better to just use the SQL getdate() function instead? (You
are wanting the current Date/Time)

i.e.
UPDATE dbo.tblXYZ
SET dtmDateAdded = <cfqueryparam cfsqltype="CF_SQL_TIMESTAMP"
value="#CreateODBCDate(Now())#"/>
WHERE intXYZ_ID = <cfqueryparam cfsqltype="CF_SQL_INTEGER"
value="#TableID#"/>

This may be faster than the following:
UPDATE dbo.tblXYZ
SET dtmDateAdded = getdate()
WHERE intXYZ_ID = <cfqueryparam cfsqltype="CF_SQL_INTEGER"
value="#TableID#"/>


Conrad


-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]] 
Sent: 15 March 2002 12:14 AM
To: CF-Talk
Subject: CFQUERYPARAM and dates


Hey All,

I'm using CFQUERYPARAM to try and insert a date into SQL Server 2K and
I'm getting this error:

ODBC Error Code = S1C00 (Driver not capable)


[Microsoft][ODBC SQL Server Driver]Optional feature not implemented



The code looks like this:

<cfqueryparam value="#Now()#" cfsqltype="cf_sql_date"> (I've also tried
#CreateODBCDate(Now())# for
value)

Any thoughts?



BTW CF 5 Enterprise on Win2K Prof.



TIA


Bryan Stevenson
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
p. 250.920.8830
e. [EMAIL PROTECTED]
---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com


______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to