Apostrophes in text fields

E

Ed Richter

I run into an error whenever someone types any words containing apostrophes in a free form text field. Thisis very easy for the average person to do without thinking. Am wondering if there is anything I can do to allow people to add apostrophes to contracted words?

The 31 and Fred Jones are other fields it's trying to post

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression ''can't shouldn't haven't', '31', 'Jones', 'Fred')'.
 
T

Thomas A. Rowe

Are you hand writing your ASP code or using the FP database components?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

I run into an error whenever someone types any words containing apostrophes in a free form text
field. Thisis very easy for the average person to do without thinking. Am wondering if there is
anything I can do to allow people to add apostrophes to contracted words?

The 31 and Fred Jones are other fields it's trying to post

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression ''can't shouldn't haven't', '31', 'Jones',
'Fred')'.
 
J

Jon Spivey

Hi Ed,

You need to double up the apostrophes, eg
<%
s = "you can't do this"
s = replace(s, "'", "''")
%>

For clarity thats double quote-single quote-double quote, double quote-single quote-single quote-double quote

--
Cheers,
Jon
Microsoft MVP

I run into an error whenever someone types any words containing apostrophes in a free form text field. Thisis very easy for the average person to do without thinking. Am wondering if there is anything I can do to allow people to add apostrophes to contracted words?

The 31 and Fred Jones are other fields it's trying to post

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression ''can't shouldn't haven't', '31', 'Jones', 'Fred')'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top