Try this....
<cfset LoopDisplayName = "#FormDisplayname[UpdateLoopIdx]#">
<cfquery name="UpdateLinks" datasource="CommonSpot-Wire">
UPDATE CouncilEmployeeLinks
SET UserID = '#session.CORNTAccount#',
link_type = '#FormLinkType[UpdateLoopIdx]#',
link_address = '#FormLinkAddress[UpdateLoopIdx]#',
display_name = <CFQUERYPARAM VALUE="What's New"
CFSQLTYPE="CF_SQL_VARCHAR">,
myLinks_section = '#Evaluate("form.linkSection" &
UpdateLoopIdx)#',
date_added = '#DateFormat(Now(),"dd/mm/yyyy")#'
WHERE ID = '#FormLinkID[UpdateLoopIdx]#'
</cfquery>
And then change the value from What's New to your variable...
HTH
-----Original Message-----
From: Adams, Stephen [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 14:46
To: CF-Talk
Subject: RE: Error with a simple expression.
**********************************************************************
WESTMINSTER CITY COUNCIL
Please refer to the disclaimer beneath this message
**********************************************************************
Hi Denna,
I tried your idea, and it still didn't work. I am trying to pass a
link's
(URL's) display name, which is "What's New" so I used your idea like
this:
<cfset LoopDisplayName = "#FormDisplayname[UpdateLoopIdx]#">
<cfquery name="UpdateLinks" datasource="CommonSpot-Wire">
UPDATE CouncilEmployeeLinks
SET UserID = '#session.CORNTAccount#',
link_type = '#FormLinkType[UpdateLoopIdx]#',
link_address = '#FormLinkAddress[UpdateLoopIdx]#',
display_name = '#PreserveSingleQuotes(What's New)#',
myLinks_section = '#Evaluate("form.linkSection" &
UpdateLoopIdx)#',
date_added = '#DateFormat(Now(),"dd/mm/yyyy")#'
WHERE ID = '#FormLinkID[UpdateLoopIdx]#'
</cfquery>
but it still fails on the updating of the display name. I tried hard
coding the "What's New" to see if that was definately the problem. It
looks as though PreseveSingleQuotes is not preventing CF from escaping
the single quotes.
Any ideas?
-----Original Message-----
From: Deanna Schneider [mailto:[EMAIL PROTECTED]]
Sent: 27 September 2002 14:15
To: CF-Talk
Subject: Re: Error with a simple expression.
Didn't someone just figure out that there's a bug with the preserve
single quotes function such that you can't use other functions inside of
it?
So, you'd have to do something like this:
<cfset thisdisplay = Evaluate("FORM.displayName" & UpdateLoopIdx)>
Then use this in your query. '#PreserveSingleQuotes(thisdisplay)#'
Deanna Schneider
Interactive Media Developer
[EMAIL PROTECTED]
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists