Jochem


Thanks that seems to work, how would the syntax change for updating
database records ??


<cfquery datasource="#Application.DSN#" name="insert_query">
  UPDATE healthnewsletters (healthid, publishdate, title, summary,
author, newsletterbody)
  SET (
    <cfqueryparam cfsqltype="cf_sql_number" value="#healthid#">,
<cfqueryparam cfsqltype="cf_sql_date" value="#publishdate#">,
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#title#">,
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#summary#">,
    <cfqueryparam cfsqltype="cf_sql_varchar" value="#Session.Fname#
#Session.Lname#">,
    <cfqueryparam cfsqltype="cf_sql_clob" value="#content#">)
</cfquery>

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
Sent: 22 December 2003 15:29
To: CF-Talk
Subject: Re: Date Errors in MX ?


Ian Vaughan wrote:
>  
> That is very true, and I have added the missing line
>  
> <cfqueryparam cfsqltype="cf_sql_number" value="#id#">,
>  
> But did not make any difference to the error message it is
still saying
> what is shown below.  It is also worth looking at the SQL and
you will
> see that no values have been passed just (param1), (param2)
etc ???

That is the way it should look when using cfqueryparam.

> 53 :     <cfqueryparam cfsqltype="cf_sql_varchar"
value="#security#">,
> 54 :     <cfif
>
isdefined("file.serverFile")>'#file.serverFile#'<cfelse>NULL</cfif>,
> 55 :     <cfqueryparam cfsqltype="cf_sql_blob"
value="#content#">
> 56 : </cfquery>
> 57 :  
> ________________________________
>
> SQL     INSERT INTO itarticle (id, articledate, articletitle,
> articlesummary, articleauthor, security, imgsrc, articlebody)
VALUES (
> (param 1) , (param 2) , (param 3) , (param 4) , (param 5) ,
(param 6) ,
> NULL, (param 7)

You are missing a right parenthesis.

Jochem

--
When you don't want to be surprised by the revolution
organize one yourself
     - Loesje
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to