Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

search form question

0 views
Skip to first unread message

Gary James-Zemaitis

unread,
Apr 9, 2002, 7:54:08 AM4/9/02
to

Hi all. I have a simple aspx search form that queries an sql db. But I
am wondering how to handle apostaphies and hyphens. Any help would be
great

Gary

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Brad Kingsley

unread,
Apr 9, 2002, 8:15:08 AM4/9/02
to
Double up on the apostrophes.

"brad's test" should be "brad''s test"

~Brad Kingsley
Microsoft MVP - ASP
Windows 2000 MCSE

http://www.orcsweb.com/
Windows 2000 Advanced Hosting
#1 in Service and Support

Please keep replies in the newsgroup


"Gary James-Zemaitis" <gary.jame...@cibc.ca> wrote in message
news:OU1jC173BHA.1344@tkmsftngp04...

Gary James-Zemaitis

unread,
Apr 9, 2002, 9:33:14 AM4/9/02
to

How would you do this if the data being entered is being put into a
variable?

Alex Lowe

unread,
Apr 9, 2002, 4:41:08 PM4/9/02
to
The best solution is to use parameters. The parameters class will handle
escape characters for you. Something like the code that can be found in this
knowledgbase article
(http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306574).

--
Alex Lowe
AspFriends.com Moderation Team
Microsoft MVP - ASP.NET
http://aspalliance.com/aldotnet

"Gary James-Zemaitis" <gary.jame...@cibc.ca> wrote in message

news:OFZkas83BHA.1036@tkmsftngp04...

Gary James-Zemaitis

unread,
Apr 10, 2002, 7:18:11 AM4/10/02
to

I took a look at the kb article but it delt with stored procedures. So
I am still unclear in how to hadle this. I know how to do this in old
ASP but it doesn't seem to work in .net

Brad Kingsley

unread,
Apr 11, 2002, 7:52:53 AM4/11/02
to
> How would you do this if the data being entered is being put into a
> variable?

Use a replace function against the variable.

--


~Brad Kingsley
Microsoft MVP - ASP
Windows 2000 MCSE

http://www.orcsweb.com/
Windows 2000 Advanced Hosting
#1 in Service and Support

Please keep replies in the newsgroup


"Gary James-Zemaitis" <gary.jame...@cibc.ca> wrote in message

news:OFZkas83BHA.1036@tkmsftngp04...

Gary James-Zemaitis

unread,
Apr 11, 2002, 8:14:09 AM4/11/02
to

Oh, That work's great thanks
0 new messages