> When do I need to use CreateODBCDateTime() to insert a date
> to a sql-server-database?
>
> What happens with my code when I move to another database
> which uses instead of an ODBC-Connection an OLE-DB or
> JDBC-Connection? Do I have to change all my insert-queries?
ODBCdateTime doesn't work on OLE-DB connections, not sure on JDBC
If you want to be paranoid about it, then instead of using
CreateODBCdateTime(), make a UDF to create a layout that the database
will understand...
DateFormat(myDate,"mmm d yyyy") & " " & TimeFormat(myDate,"HH:mm:ss")
Then insert as
Insert into myTable (myDate)
Values ('#myDate#')
With the apostrophies, it works perfectly...
Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911
www.aspmedia.co.uk
www.aspevents.net
An ISO9001 registered company.
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
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