Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with double quotes

Status
Not open for further replies.

Gill1978

Programmer
Joined
Jun 12, 2001
Messages
277
Location
GB
Hi!

I'm trying to save a the contents of the a textarea box, I have entered the following into the box

The classical line is the company's leading brand, which is flanked by a more casual line and a "made to measure" service. Together, these three lines amount to more than 200,000 coats and jackets per year made in-house (Made in Italy), which represents 80% of turnover. The Groups seems to be pitched closest to the menswear range of Next (UK) ( not including shoes.

However when i save it and go back into the form that contains the above box it only has the following saved,

The classical line is the company's leading brand, which is flanked by a more casual line and a

The code once run looks like this:
Update TBL_PARTY
set PartName = '', PartFacilities ='',
PartLocation ='', PartOwner ='',
PartBusinessActivities = 'The classical line is the company''s leading brand, which is flanked by a more casual line and a ', PartNoOfPersonnel = convert (varchar, '0'),
PartWebSite = ''
where partyid = 595


Why is the double quotes stopping the rest of the textarea contents from being saved??

Cheers
Julie
 
I've never had this problem so this is a blind shot in the dark... but I would try.. if its a dynamic variable you're inserting... put this before the query.

Code:
<CFSET variable=Replace(Variable,'&quot;','&quot;','ALL')>

Thanks,
Tony Hicks [ Founder of <A href=&quot; online bible. ]
 
I've tried that by doing the following:
set a variable:

<CFSET cfFULLvariable=Replace(#Business_Type#,'&quot;','&quot;','ALL')>

and then changed the query by putting in cfFULLvariable with hashes and quotes round it as shown below:

<cfquery DATASOURCE=&quot;#application.dsn#&quot; NAME=&quot;UpdateParty&quot;>
Update TBL_PARTY
set PartName = '#seller_name#', PartFacilities ='#facilities#',
PartLocation ='#location#', PartOwner ='#ownership#',
PartBusinessActivities = '#cfFULLvariable#', PartNoOfPersonnel = convert (varchar, #PreserveSingleQuotes(personnel)#),
PartWebSite = '#Website_Address#'
where partyid = #CFPartyID#
</cfquery>

But it still doesnt work

Cheers Julie
 
OH GEEZ! I'm such a fool heh.. I don't believe I wrote that... try...

Code:
<CFSET variable=Replace(Variable,'&quot;','&quot;','ALL')>

==============

I've never had this problem so this is a blind shot in the dark... but I would try.. if its a dynamic variable you're inserting... put this before the query.

<CFSET variable=Replace(Variable,'&quot;','&quot;','ALL')>

Thanks,
Tony Hicks [ Founder of <A href=&quot; online bible. ]
 
Its not workin'

I've put this in:

<CFSET cfFULLvariable=Replace(#Business_Type#,'&quot;','&&quot;' ,'ALL')>

and the insert query using the above looks like this

<cfquery DATASOURCE=&quot;#application.dsn#&quot; NAME=&quot;UpdateParty&quot;>
Update TBL_PARTY
set PartBusinessActivities = '#cfFULLvariable#' where partyid = #CFPartyID#
</cfquery>

Any other ideas???

Thanks

Julie
 
I've had a look and the variable #Business_Type# is being passed from the first cfm file to the second and then third page, when i output the the variable on each screen, the full text has been passed to the second screen, but not to the third screen. I am using <CF_EMBEDFIELDS> to pass all data to each screen!

Does that give any more clues?

i've done
<CFSET cfFULLvariable=Replace(#Business_Type#,'&quot;','&&quot;' ,'ALL')>

which is ,single quote double quote single quote, single quote double quote single quote,


 
Can't get through the firewall here!
And after ALOT of messin around ... it's passed!

Using:

<cfoutput>
<cfset CFNewBusinessActivity = #HTMLEditFormat(CFBusinessActivity)#>
</cfoutput>
<cfoutput><input type=&quot;Hidden&quot; name=&quot;CFTBusinessActivity&quot; value=&quot;#CFNewBusinessActivity#&quot;></cfoutput>

Passed the contents of the textarea box through each page using the above!!

Not very clever I know!

Thanks for all the help Tony!

Jules
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top