Ask a Question related to ASP Database, Design and Development.
-
Jay #1
Using Invalid Characters
I am using MS SQL for my ASP application and have several 'comments' fields.
Obviously in these fields users are going to enter invalid characters and
when they try to submit they will receive an error message. How can I deal
with these invalid characters so the information they are trying to submit
is entered.
On [url]http://www.aspfaq.com/show.asp?id=2399[/url] I found the following list of
invalid characters ",<.>?;:'@#~]}[{=+)(*&^%$£!`¬| -_". Is there a way to
escape each of these characters as they are found before submitting to the
database?
Thank you,
--
"Some see the glass as half-empty;
some see the glass as half-full.
I see the glass as too big." - George Carlin
- J
Jay Guest
-
error invalid characters in my cfquery?
The list. What is that datatype your passing the list to? Is it an numeric based or string? If it is a string (char, varchar, ntext, nvarchar,... -
Matching invalid characters in a URL
I'm trying to throw out URLs with any invalid characters in them, like '@". According to http://www.ietf.org/rfc/rfc1738.txt : Thus, only... -
#25405 [Opn->Bgs]: The session id contains invalid characters
ID: 25405 Updated by: iliaa@php.net Reported By: pop501 at hotmail dot com -Status: Open +Status: ... -
[PHP] Invalid Characters, XML...
Here's what I have been using. $trans= array("'" => "'", "'" => "'",">" => ">", "<" => "<", "&" => "&","-" => "-", "°" => "°", "±" => "±", "-"... -
Invalid Characters, XML...
Im using PHP to write to XML files, but I am having some problems. A lot of users are cutting and pasting content from text editors like word,... -
Aaron Bertrand [MVP] #2
Re: Using Invalid Characters
That's my own made up invalid list. The only character that should cause a
problem in a SQL statement is an apostrophe (since it's also used to delimit
the string). See [url]http://www.aspfaq.com/2035[/url]
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"Jay" <jerry280@yahoo.com> wrote in message
news:%23XNEkqfLEHA.3664@TK2MSFTNGP10.phx.gbl...>I am using MS SQL for my ASP application and have several 'comments'
>fields.
> Obviously in these fields users are going to enter invalid characters and
> when they try to submit they will receive an error message. How can I deal
> with these invalid characters so the information they are trying to submit
> is entered.
>
> On [url]http://www.aspfaq.com/show.asp?id=2399[/url] I found the following list of
> invalid characters ",<.>?;:'@#~]}[{=+)(*&^%$£!`¬| -_". Is there a way to
> escape each of these characters as they are found before submitting to the
> database?
>
> Thank you,
>
> --
> "Some see the glass as half-empty;
> some see the glass as half-full.
> I see the glass as too big." - George Carlin
>
> - J
>
>
Aaron Bertrand [MVP] Guest
-
Jay #3
Re: Using Invalid Characters
Thanks Aaron.
I used to use MS Access and if I recall correctly we had some issues with
other characters but after testing some of them with the SQL Server it looks
as though it is only the apostrophe that needs to be dealt with. Thank you
for the tip and the great site!
--
"Some see the glass as half-empty;
some see the glass as half-full.
I see the glass as too big." - George Carlin
- J
"Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
news:e7uZ0XgLEHA.2576@TK2MSFTNGP12.phx.gbl...a> That's my own made up invalid list. The only character that should causedelimit> problem in a SQL statement is an apostrophe (since it's also used toand> the string). See [url]http://www.aspfaq.com/2035[/url]
>
> --
> Aaron Bertrand
> SQL Server MVP
> [url]http://www.aspfaq.com/[/url]
>
>
>
>
> "Jay" <jerry280@yahoo.com> wrote in message
> news:%23XNEkqfLEHA.3664@TK2MSFTNGP10.phx.gbl...> >I am using MS SQL for my ASP application and have several 'comments'
> >fields.
> > Obviously in these fields users are going to enter invalid charactersdeal> > when they try to submit they will receive an error message. How can Isubmit> > with these invalid characters so the information they are trying tothe> > is entered.
> >
> > On [url]http://www.aspfaq.com/show.asp?id=2399[/url] I found the following list of
> > invalid characters ",<.>?;:'@#~]}[{=+)(*&^%$£!`¬| -_". Is there a way to
> > escape each of these characters as they are found before submitting to>> > database?
> >
> > Thank you,
> >
> > --
> > "Some see the glass as half-empty;
> > some see the glass as half-full.
> > I see the glass as too big." - George Carlin
> >
> > - J
> >
> >
>
Jay Guest



Reply With Quote

