-
Parsing strings of text to find ' and "
Addition to the Writing SQL problem post earlier, I found out that I will
need to do the following.
I need to parse the string that the user entered to find single quotes ' and
double quotes ", add backslash \ just before the single quotes and double
quotes.
How can I do that?
--
Best Regards,
Wing Hoe
---------------------------------------------------------------
Email: winghoe@hotmail.com
ICQ: 2213281
www: http://pwp.maxis.net.my/winghoe
Job Seeking Status : Active
Availability : May 2001 (after degree course finish)
---------------------------------------------------------------
-
Re: Parsing strings of text to find ' and "
I use a PreparedStatement instead of a Statement to do this. It takes care
of all those details, and it's also faster on many databases if you do more
than one insert.
PC2
Lim Wing Hoe <winghoe@hotmail.com> wrote in message
news:3a419ae4@news.devx.com...
> Addition to the Writing SQL problem post earlier, I found out that I will
> need to do the following.
>
> I need to parse the string that the user entered to find single quotes '
and
> double quotes ", add backslash \ just before the single quotes and double
> quotes.
>
> How can I do that?
> --
>
>
>
> Best Regards,
> Wing Hoe
> ---------------------------------------------------------------
> Email: winghoe@hotmail.com
> ICQ: 2213281
> www: http://pwp.maxis.net.my/winghoe
> Job Seeking Status : Active
> Availability : May 2001 (after degree course finish)
> ---------------------------------------------------------------
>
>
>
>
-
Re: Parsing strings of text to find ' and "
Thanks. It's working now.
--
Best Regards,
Wing Hoe
---------------------------------------------------------------
Email: winghoe@hotmail.com
ICQ: 2213281
www: http://pwp.maxis.net.my/winghoe
Job Seeking Status : Active
Availability : May 2001 (after degree course finish)
---------------------------------------------------------------
"Paul Clapham" <pclapham@core-mark.com> wrote in message
news:3a423c5a$1@news.devx.com...
> I use a PreparedStatement instead of a Statement to do this. It takes
care
> of all those details, and it's also faster on many databases if you do
more
> than one insert.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks