My first guess, it's the quotes causing your trouble. Use
PreserveSingleQuotes()
<CFQUERY NAME="myTask" DATASOURCE="#DataSourceName#">
INSERT INTO PingResults ( DomainName,
StartTime,
Dfield1,
Dfield2,
Dfield3,
Dfield4)
VALUES (
'#PreserveSingleQuotes(session.RecordArray[1])#',
'#PreserveSingleQuotes(session.RecordArray[2])#',
'#PreserveSingleQuotes(session.RecordArray[4])#',
'#PreserveSingleQuotes(session.RecordArray[5])#',
'#PreserveSingleQuotes(session.RecordArray[6])#',
'#PreserveSingleQuotes(session.RecordArray[7])#'
</CFQUERY>
-----Original Message-----
From: Nick Baker [mailto:[EMAIL PROTECTED]
Sent: Friday, November 07, 2003 2:26 PM
To: CF-Talk
Subject: Entering A Time Stamp in DB -- Problem
CF V 5
MS Access DB
I have time in the following format that was extracted in one CF template
and stuffed in a DB without any hitch.
{ts '2003-11-07 19:57:14'}
When this same info iss passed as part of a text to another CF template,
using CFHTTP, the same CF DB <CFQUERY code throws an error when attempting
to insert into a copy of the same DB.
In both DB's I am trying to stuff the info into a Date/Time field, i.e.,
StartTime.
<CFQUERY NAME="myTask" DATASOURCE="#DataSourceName#">
INSERT INTO PingResults ( DomainName,
StartTime,
Dfield1,
Dfield2,
Dfield3,
Dfield4)
VALUES (
'#session.RecordArray[1]#',
'#session.RecordArray[2]#',
'#session.RecordArray[4]#',
'#session.RecordArray[5]#',
'#session.RecordArray[6]#',
'#session.RecordArray[7]#'
</CFQUERY>
Apparently something is being lost in the transfer process, and I don't
know how to get it back.
Thanks,
Nick
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Entering A Time Stamp in DB -- Problem Nick Baker
- RE: Entering A Time Stamp in DB -- Problem J E VanOver
- RE: Entering A Time Stamp in DB -- Problem peter . tillbrook