html special characters and database problems, arg!

J

John

I am having problems with special characters with database calls (if I'm
referring to this in the right way). the problem is with apostrophes of all
things. If an end user puts an apostrophe in something ASP will interprete
it as a delimiter. This is aggravating because I'm trying to make this as
simple for the end user as possible and if they can't place something in a
simple text field like "Joe's Bar" (which comes out as "Joe") then I have a
problem because I don't have a solution for this. It appears that this "
´ " is not quite the same as " ' " and I don't see a special
character for apostrophes either.

This seems like a real pain in kee for something as small as this but it
confuses end users to not be able to write simple english.
 
S

Steven Burn

strMyQuery = Replace(Request.Form("txtSomeField"), "'", "")

Or

strMyQuery = Replace(Request.Form("txtSomeField"), "'", """)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
B

Bob Barrows [MVP]

John said:
I am having problems with special characters with database calls (if
I'm referring to this in the right way). the problem is with
apostrophes of all things. If an end user puts an apostrophe in
something ASP will interprete it as a delimiter. This is aggravating
because I'm trying to make this as simple for the end user as
possible and if they can't place something in a simple text field
like "Joe's Bar" (which comes out as "Joe") then I have a problem
because I don't have a solution for this. It appears that this "
´ " is not quite the same as " ' " and I don't see a
special character for apostrophes either.

This seems like a real pain in kee for something as small as this but
it confuses end users to not be able to write simple english.

Yes. Delimiters are a pain, aren't they? That's why I think it is a crime
that newbies are taught the wrong way (dynamic sql) before the right way
(stored procedures, passing parameters). You did not tell us what database
you are using so:

http://www.google.com/groups?hl=en&...&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=10&sa=NBob Barrows--Microsoft MVP - ASP/ASP.NETPlease reply to the newsgroup. This email account is my spam trap so Idon't check it very often. If you must reply off-line, then remove the"NO SPAM"
 
S

Steven Burn

Bob hehe, the URL is majorly invalid <vbg>

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Bob Barrows said:
Yes. Delimiters are a pain, aren't they? That's why I think it is a crime
that newbies are taught the wrong way (dynamic sql) before the right way
(stored procedures, passing parameters). You did not tell us what database
you are using so:
http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=e6lLVvOcDHA.12
04%40TK2MSFTNGP12.phx.gblhttp://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=
UTF-8&threadm=3bc06369.4904372%40news.charter.net&rnum=4&prev=/groups%3Fas_q
%3Ddelimiter%26safe%3Dimages%26ie%3DUTF-8%26oe%3DUTF-8%26as_uauthors%3DBob%2
520Barrows%26lr%3D%26hl%3Denhttp://tinyurl.com/jyy0http://www.google.com/gro
ups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=O31NZa%230DHA.3436%40tk2msftngp13.ph
x.gbl&rnum=11&prev=/groups%3Fq%3Ddelimiter%2Bauthor:Bob%2Bauthor:Barrows%26h
l%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26start%3D10%26sa%3DNBob
Barrows--Microsoft MVP - ASP/ASP.NETPlease reply to the newsgroup. This
email account is my spam trap so Idon't check it very often. If you must
reply off-line, then remove the"NO SPAM"
 
B

Bob Barrows [MVP]

Bob said:
Yes. Delimiters are a pain, aren't they? That's why I think it is a
crime
that newbies are taught the wrong way (dynamic sql) before the right
way (stored procedures, passing parameters). You did not tell us what
database
you are using so:
http://www.google.com/groups?hl=en&...&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=10&sa=NBob


I do not understand what happened to the line breaks. Let's try again:

http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&[email protected]

http://www.google.com/groups?hl=en&...t&rnum=4&prev=/groups?as_q=delimiter&safe=ima
ges%26ie%3DUTF-8%26oe%3DUTF-8%26as_uauthors%3DBob%2520Barrows%26lr%3D%26hl%3
Den

http://tinyurl.com/jyy0

http://www.google.com/groups?hl=en&...ows&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=10&sa=N
 

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

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top