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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Double Quotes into (access) database? 1

Status
Not open for further replies.

lonechicken

Programmer
Sep 25, 2001
18
US
Normally, all I'd have to do is replace doublequotes, carriage returns, etc. with HTML tags and insert that result into the database.

The problem here is, with this Access database I'm working with, the people will be using it for other purposes as well, not just web displaying. So a br tag or &qu quote type tags will look like junk in non-web usage.

How do I insert into the database, a " when it usually cuts off the rest of the textfield?

ie.
This is my "Test Title"

...is entered into a Title text field. If I don't convert it, it looks like...

This is my

...in the database.
 
i think that you should try escaping " character;
try something like:

<cfset Form.Title = Replace(Form.Title, &quot;&quot;&quot;, &quot;&quot;&quot;&quot;)>

and then insert into the database Sylvano
dsylvano@hotmail.com
 

oops,

<cfset Form.Title = Replace(Form.Title, &quot;&quot;&quot;, &quot;&quot;&quot;&quot;, &quot;all&quot;)>
Sylvano
dsylvano@hotmail.com
 
Thanks,
Actually, what I ended up doing, and I think this works out fine, is:

1) When passing the text around in Input or Hidden type form fields, I have the double quotes converted to the HTML code &qut;
2) Immediately before the DB update or insert code, I convert the string back to its original form and it works like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top