|
 |
asp_databases thread: Problems with the ' character when submitting a form
Message #1 by "Dean" <spinout@i...> on Sun, 20 Jan 2002 14:56:17
|
|
Hi There
Does anyone know of a way to get around the problem of SQL statement's
failing then a user enters the ' character in to a form. This character
obviously is used in the SQL statement itself and therefore screws up the
statement if the user uses it in their form submission. How can I fix this
problem?
Many thanks for your help.
Dean.
Message #2 by "Tomm Matthis" <matthis@b...> on Sun, 20 Jan 2002 09:54:54 -0500
|
|
You can:
A: Do a replace on all strings for " ' " and escape them... (double them up to
a " '' ")
or
B: Use Command Objects and Parameter Objects... they will handle the problem
for you "automagically".
-- Tomm
> -----Original Message-----
> From: Dean [mailto:spinout@i...]
> Sent: Sunday, January 20, 2002 2:56 PM
> To: ASP Databases
> Subject: [asp_databases] Problems with the ' character when submitting a
> form
>
>
> Hi There
> Does anyone know of a way to get around the problem of SQL statement's
> failing then a user enters the ' character in to a form. This character
> obviously is used in the SQL statement itself and therefore screws up the
> statement if the user uses it in their form submission. How can I fix this
> problem?
>
> Many thanks for your help.
>
> Dean.
>
> $subst('Email.Unsub').
>
Message #3 by "guardian" <guardian@v...> on Mon, 21 Jan 2002 12:14:38 +0530
|
|
Dean
actually ur question is not understable
However if u mean while inserting data in database from front-end then u can
use the validation of form then use the insert,update,delete statements..
then ur problem will be solved.
arati
----- Original Message -----
From: "Dean" <spinout@i...>
To: "ASP Databases" <asp_databases@p...>
Sent: Sunday, January 20, 2002 2:56 PM
Subject: [asp_databases] Problems with the ' character when submitting a
form
> Hi There
> Does anyone know of a way to get around the problem of SQL statement's
> failing then a user enters the ' character in to a form. This character
> obviously is used in the SQL statement itself and therefore screws up the
> statement if the user uses it in their form submission. How can I fix this
> problem?
>
> Many thanks for your help.
>
> Dean.
>
$subst('Email.Unsub').
>
Message #4 by "Peter Foti (PeterF)" <PeterF@S...> on Mon, 21 Jan 2002 10:11:11 -0500
|
|
That's funny... no one else seemed to have any problem understanding the
question. :)
> -----Original Message-----
> From: guardian [mailto:guardian@v...]
> Sent: Monday, January 21, 2002 1:45 AM
> To: ASP Databases
> Subject: [asp_databases] Re: Problems with the ' character when
> submitting a form
>
>
> Dean
>
> actually ur question is not understable
>
> However if u mean while inserting data in database from
> front-end then u can
> use the validation of form then use the insert,update,delete
> statements..
> then ur problem will be solved.
>
> arati
> ----- Original Message -----
> From: "Dean" <spinout@i...>
> To: "ASP Databases" <asp_databases@p...>
> Sent: Sunday, January 20, 2002 2:56 PM
> Subject: [asp_databases] Problems with the ' character when
> submitting a
> form
>
>
> > Hi There
> > Does anyone know of a way to get around the problem of SQL
> statement's
> > failing then a user enters the ' character in to a form.
> This character
> > obviously is used in the SQL statement itself and therefore
> screws up the
> > statement if the user uses it in their form submission. How
> can I fix this
> > problem?
> >
> > Many thanks for your help.
> >
> > Dean.
> >
> $subst('Email.Unsub').
> >
>
>
> $subst('Email.Unsub').
>
|
|
 |