inserting quotes

I am inserting data into an access database.
The problem is that quotes in the field terminiate the string.
If the input value is
24" plug
all I get in the database is
24
How can I fix this?
Gonzosez [ Mi, 11 Januar 2006 14:28 ] [ ID #1137371 ]

Re: inserting quotes

I think this link may help...

http://www.aspfaq.com/show.asp?id 35
josephweiss [ Mi, 11 Januar 2006 14:51 ] [ ID #1137372 ]

Re: inserting quotes

Gonzosez wrote:
> I am inserting data into an access database.
> The problem is that quotes in the field terminiate the string.
> If the input value is
> 24" plug
> all I get in the database is
> 24
> How can I fix this?
My best recommendation is to stop using dynamic sql. If you use parameters,
you don't have to worry about quotes, apostrophes and sql injection. See
http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.db/msg/72e36562fee7804e
for one method.

Better yet, use saved parameter queries as described in these posts:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1& selm=eHYxOyvaDHA.4020%40tk2msftngp13.phx.gbl

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1& selm=ukS%246S%247CHA.2464%40TK2MSFTNGP11.phx.gbl

http://www.google.com/groups?selm=eETTdnvFDHA.1660%40TK2MSFT NGP10.phx.gbl&oe=UTF-8&output=gplain

http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&sel m=e6lLVvOcDHA.1204%40TK2MSFTNGP12.phx.gbl

Bob Barrows


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
reb01501 [ Mi, 11 Januar 2006 16:04 ] [ ID #1137373 ]
Webserver » microsoft.public.inetserver.asp.db » inserting quotes

Vorheriges Thema: Server.ScriptTimeout
Nächstes Thema: MSDE & ASP