generally speaking you don't have single-quotes around a date value
when you're inserting this way, so rather than
'#session.RecordArray[1]#', you would just have
#createodbcdatetime(session.recordArray[1])# -- createodbcdatetime()
will ensure it's the proper format, otherwise it's liable to be even
worse because when you put '#session.RecordArray[1]#' in your cfquery
it's going to attempt to escape those single quotes in the session
variable, so what it's attempting to insert into the db is actually
the string "{ts '2003-11-07 19:57:14'}" instead of the datetime value
it represents. Better yet use cfqueryparam.


> 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

> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To unsubscribe:
>    Send UNSUBSCRIBE to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org



s. isaac dealey                972-490-6624

team macromedia volunteer      http://www.macromedia.com/go/team

chief architect, tapestry cms  http://products.turnkey.to

onTap is open source           http://www.turnkey.to/ontap


-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe: 
   Send UNSUBSCRIBE to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to