This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > March 2005 > Characters Allowed In Text / Memo Fields





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Characters Allowed In Text / Memo Fields
Peter

2005-03-30, 6:48 pm

Hi,

I am playing with a photo web site, where a user can fill in a comment
form and have his/her comments stored in an Access database.

All works well until an apostrophe (') is entered, and then it fails
with the following message:-
-----
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in string in
query expression '''')'.

/kcupdate.asp, line 20
-----

Is there a way to allow an apostrophe in a comment? The fields on the
form are all text fields, and in Access, the name is a text field and
the comment is a Memo field.

Any help would be appreciated.

Cheers,

Pete.

Dreamweaver MX 2004
Access 2003 (defaulting to Access 2000 file format on save)
Paul Woodward

2005-03-31, 6:26 pm

"Peter" <badderspj@yahoo.co.uk> wrote in message
news:d2ehl0$3g7$1@titan.btinternet.com...
Hi,

I am playing with a photo web site, where a user can fill in a comment
form and have his/her comments stored in an Access database.

All works well until an apostrophe (') is entered, and then it fails
with the following message:-
-----
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in string in
query expression '''')'.

/kcupdate.asp, line 20
-----

Is there a way to allow an apostrophe in a comment? The fields on the
form are all text fields, and in Access, the name is a text field and
the comment is a Memo field.

Any help would be appreciated.

Cheers,

Pete.

Dreamweaver MX 2004
Access 2003 (defaulting to Access 2000 file format on save)

===

Hi Pete,

Basically long story cut chort the apostrophe is generally used with
scripting languages to encase field data to or from a database and by
entering another apostrophe you are breaking the encasement.

What you need to do is get the script which is processing the form data to
process the data from the form so that an special characters are either
removed or adequately dealt with.

I assume you are using ASP because you are using an Access database and I
would guess that it has a function to convert form data into a database safe
format. I am more familiar with PHP and the following link should explain
the situation however there should be something for ASP: -

http://uk.php.net/manual/en/functio...pecialchars.php

You should really process all data entered by a user of your website prior
to entering it into your database because it is very simple for your
friendly hacker to inject some special characters to mess up your site
and/or database.

If you want any further information on this subjet please feel free to email
me on paulwoody<ANTISPAM>@yahoo.com remembering to remove the <ANTISPAM>
block.

Kind Regards,

Paul Woodward


Pete

2005-03-31, 6:31 pm

Paul Woodward wrote:
> "Peter" <badderspj@yahoo.co.uk> wrote in message
> news:d2ehl0$3g7$1@titan.btinternet.com...
> Hi,
>
> I am playing with a photo web site, where a user can fill in a comment
> form and have his/her comments stored in an Access database.
>
> All works well until an apostrophe (') is entered, and then it fails
> with the following message:-
> -----
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error in string in
> query expression '''')'.
>
> /kcupdate.asp, line 20
> -----
>
> Is there a way to allow an apostrophe in a comment? The fields on the
> form are all text fields, and in Access, the name is a text field and
> the comment is a Memo field.
>
> Any help would be appreciated.
>
> Cheers,
>
> Pete.
>
> Dreamweaver MX 2004
> Access 2003 (defaulting to Access 2000 file format on save)
>
> ===
>
> Hi Pete,
>
> Basically long story cut chort the apostrophe is generally used with
> scripting languages to encase field data to or from a database and by
> entering another apostrophe you are breaking the encasement.
>
> What you need to do is get the script which is processing the form data to
> process the data from the form so that an special characters are either
> removed or adequately dealt with.
>
> I assume you are using ASP because you are using an Access database and I
> would guess that it has a function to convert form data into a database safe
> format. I am more familiar with PHP and the following link should explain
> the situation however there should be something for ASP: -
>
> http://uk.php.net/manual/en/functio...pecialchars.php
>
> You should really process all data entered by a user of your website prior
> to entering it into your database because it is very simple for your
> friendly hacker to inject some special characters to mess up your site
> and/or database.
>
> If you want any further information on this subjet please feel free to email
> me on paulwoody<ANTISPAM>@yahoo.com remembering to remove the <ANTISPAM>
> block.
>
> Kind Regards,
>
> Paul Woodward
>
>


Thanks Paul, I look into that and get back to you if I need more help
(probable ;-) I'm new at this.)

Pete.
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews