Couple of things...

[EMAIL PROTECTED] wrote:
> <cfset date=#Now()#>
>
Avoid using reserved words for variable names - date is a reserved word.
  Use something like thisDate instead.  Plus you only need :
<cfset thisDate = Now()>

> <!--- do insert now --->
> <CFQUERY NAME="qnews" DATASOURCE="#dsn#" USERNAME="#un#" PASSWORD="#pw#">
>     INSERT INTO guide (title, content, update)
>              VALUES ('#title#', '#content#', '#date#' )
> </CFQUERY>
>

In your database use a date or datetime field for the "update" field.
This is what you should be using in Access as well.  When you've done
this you won't need quotes around date field data. You also don't need
quotes around numeric values either.  Your query will look like this :

<CFQUERY NAME="qnews" DATASOURCE="#dsn#" USERNAME="#un#" PASSWORD="#pw#">
    INSERT INTO guide (title, content, update)
    VALUES ('#title#', '#content#', #thisDate#)
</CFQUERY>

You could also just use now() directly in the query

<CFQUERY NAME="qnews" DATASOURCE="#dsn#" USERNAME="#un#" PASSWORD="#pw#">
    INSERT INTO guide (title, content, update)
    VALUES ('#title#', '#content#', #now()#)
</CFQUERY>

Hope this helps.

Regards

Stephen
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to