Re: handling single quotes??
From: Scott M. (s-mar_at_nospam.nospam)
Date: 06/02/04
- Next message: Scott M.: "Re: Explain Initialization..."
- Previous message: Scott M.: "Re: variable scope problem"
- In reply to: Dan Brussee: "Re: handling single quotes??"
- Next in thread: Dan Brussee: "Re: handling single quotes??"
- Reply: Dan Brussee: "Re: handling single quotes??"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Jun 2004 22:09:19 -0400
That won't cut it in .NET. It will be seen as two strings next to each
other without any concatenation.
"Dan Brussee" <dbrussee@nc.rr.com> wrote in message
news:qr3qb0hd638u9m6hd4ve79gganj83nmhp0@4ax.com...
> At least with SQL Server, it recognizes two single quotes as a single
> quote inside single quote delimiters. Huh??
>
> select * from table where name = 'Bob''s mini mart'
>
> Notice two single quotes between b and s of Bob's. Use a replace
> method to get it that way.
>
>
> On Tue, 1 Jun 2004 19:05:36 -0400, "Scott M." <s-mar@nospam.nospam>
> wrote:
>
> >try inserting the char code. I believe it's 39 - - CHR(39)
> >
> >
> >"SStory" <TheStorys@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
> >news:OQhUzsCSEHA.2936@TK2MSFTNGP12.phx.gbl...
> >> How can I handle the user entering single quotes like in
> >>
> >> Bob's mini mart?
> >>
> >> If I use command objects will this no longer be an issue?
> >>
> >> I guess that would mean no simple adhoc SQL statements right?
> >>
> >> like SELECT name from WHATEVER
> >>
> >> would need a command object with
> >>
> >> "SELECT @NAME, etc.
> >> and then params
> >>
> >> is this the way to solve the problem?
> >>
> >> Thanks,
> >>
> >> Shane
> >>
> >>
> >
>
- Next message: Scott M.: "Re: Explain Initialization..."
- Previous message: Scott M.: "Re: variable scope problem"
- In reply to: Dan Brussee: "Re: handling single quotes??"
- Next in thread: Dan Brussee: "Re: handling single quotes??"
- Reply: Dan Brussee: "Re: handling single quotes??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|