Try this. (I guessed on the CFSQLTYPEs)

<CFQUERY DATASOURCE="#Application.DSN#" name="insert_query">
UPDATE downloads
SET 
 dldate = <cfqueryparam cfsqltype="CF_SQL_TIMESTAMP"
value="#formatted_date#">,
 dltitle = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.dltitle#">,
 dlsummary =<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
value="#form.dlsummary#">,
 area =<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.area#">,
 dlos =<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.dlos#">,
 dlpath =<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
value="#file.serverFile#">,
 username =<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#Session.Fname#
#Session.Lname#">
WHERE dloadidid = <cfqueryparam cfsqltype="CF_SQL_INTEGER"
value="#form.id#">
</CFQUERY>

Oh yeah...you're using both SESSION and APPLICATION variables here, and
there's not a CFLOCK in sight.



> -----Original Message-----
> From: Ian Vaughan [mailto:i.vaughn@;neath-porttalbot.gov.uk]
> Sent: Thursday, October 24, 2002 6:05 AM
> To: CF-Talk
> Subject: Re: SQL Errors when updating Oracle table with CF ???
> 
> 
> What exactly do you mean with the old code, what exactly does cfparam
> achieve, I am just trying to update a database field, why 
> does cfparam need
> to be used and why does the update code need to be updated?
> 
> I have just had a look at the CFPARAM tag and is used to test for a
> parameter's existence, and optionally test its data type, and 
> provide a
> default value if one is not assigned.
> 
> The syntax I am using looks correct so what else needs to be 
> modified, I
> cant see what??
> 
> 
> Ian
> 
> 
> 
> ----- Original Message -----
> From: "Jochem van Dieten" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, October 24, 2002 10:23 AM
> Subject: Re: SQL Errors when updating Oracle table with CF ???
> 
> 
> > Ian Vaughan wrote:
> >
> > > I have just changed my query to cfqueryparam
> > >
> > > <cfparam name="file.serverFile" value="null">
> >
> > value => default
> >
> > > <CFQUERY DATASOURCE="#Application.DSN#" name="insert_query">
> > > UPDATE downloads
> > > SET dldate = TO_DATE ('#formatted_date#', 'MM/DD/YYYY'),
> > > dltitle ='#form.dltitle#',
> > > dlsummary ='#form.dlsummary#',
> > > area ='#form.area#',
> > > dlos ='#form.dlos#',
> > > dlpath ='#file.serverFile#',
> > > username ='#Session.Fname# #Session.Lname#'
> > > WHERE dloadidid = #form.id#
> > > </CFQUERY>
> >
> > This is still the old code without cfqueryparam.
> >
> > Jochem
> >
> > 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to