very weird access/ASP error

very weird access/ASP error

am 27.09.2006 22:52:59 von Jason Simmons

i have a memo field in an access database. the ASP page enters data to this
field just fine.... however the following test (dont ask):

Hello Charlie,

you have no idea who I am but I thought you should know that your wife has
been spending your mortgage money on things other than paying the bank. You
also don't know that she has been hiding the foreclosure letters from you
and its only a matter of time before you are kicked out of your home that
you spent so many years paying for. I cant tell you who I am as it will
cause much grief in the family, but I also cant watch as this goes on. If my
wife betrayed me like that I would want someone to tell me. Good luck!

produces this error:

Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression ''Hello Charlie, you
have no idea who I am but I thought you should know that your wife has been
spending your mortgage money on things other than paying the bank. You also
don't know that she has been hiding the foreclosure letters from you and its
on'.



whats going on here?

Re: very weird access/ASP error

am 27.09.2006 23:17:07 von reb01501

Joe Reynolds wrote:
> i have a memo field in an access database. the ASP page enters data
> to this field just fine.... however the following test (dont ask):
>
> Hello Charlie,
>
> you have no idea who I am but I thought you should know that your
> wife has been spending your mortgage money on things other than
> paying the bank. You also don't know that she has been hiding the
> foreclosure letters from you and its only a matter of time before you
> are kicked out of your home that you spent so many years paying for.
> I cant tell you who I am as it will cause much grief in the family,
> but I also cant watch as this goes on. If my wife betrayed me like
> that I would want someone to tell me. Good luck!
> produces this error:
>
> Microsoft JET Database Engine error '80040e14'
> Syntax error (missing operator) in query expression ''Hello Charlie,
> you have no idea who I am but I thought you should know that your
> wife has been spending your mortgage money on things other than
> paying the bank. You also don't know that she has been hiding the
> foreclosure letters from you and its on'.
>
>
>
> whats going on here?

Probably the apostrophe but that;s just a guess. How was this query
expression created?


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: very weird access/ASP error

am 27.09.2006 23:54:04 von Jason Simmons

"Bob Barrows [MVP]" wrote in message
news:%23viOIpn4GHA.2464@TK2MSFTNGP06.phx.gbl...
> Joe Reynolds wrote:
>> i have a memo field in an access database. the ASP page enters data
>> to this field just fine.... however the following test (dont ask):
>>
>> Hello Charlie,
>>
>> you have no idea who I am but I thought you should know that your
>> wife has been spending your mortgage money on things other than
>> paying the bank. You also don't know that she has been hiding the
>> foreclosure letters from you and its only a matter of time before you
>> are kicked out of your home that you spent so many years paying for.
>> I cant tell you who I am as it will cause much grief in the family,
>> but I also cant watch as this goes on. If my wife betrayed me like
>> that I would want someone to tell me. Good luck!
>> produces this error:
>>
>> Microsoft JET Database Engine error '80040e14'
>> Syntax error (missing operator) in query expression ''Hello Charlie,
>> you have no idea who I am but I thought you should know that your
>> wife has been spending your mortgage money on things other than
>> paying the bank. You also don't know that she has been hiding the
>> foreclosure letters from you and its on'.
>>
>>
>>
>> whats going on here?
>
> Probably the apostrophe but that;s just a guess. How was this query
> expression created?
>
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
yup thats it. i take posted data from a text box and save it in a variable,
then pass the variable in the SQL string.
how can i fix this?

Re: very weird access/ASP error

am 28.09.2006 00:00:43 von Jason Simmons

will this work?

http://wiki.ittoolbox.com/index.php/FAQ:How_do_I_escape_sing le_quotes_in_SQL_queries%3F

i tried it and it seems to work but i wanted your opinion


"Bob Barrows [MVP]" wrote in message
news:%23viOIpn4GHA.2464@TK2MSFTNGP06.phx.gbl...
> Joe Reynolds wrote:
>> i have a memo field in an access database. the ASP page enters data
>> to this field just fine.... however the following test (dont ask):
>>
>> Hello Charlie,
>>
>> you have no idea who I am but I thought you should know that your
>> wife has been spending your mortgage money on things other than
>> paying the bank. You also don't know that she has been hiding the
>> foreclosure letters from you and its only a matter of time before you
>> are kicked out of your home that you spent so many years paying for.
>> I cant tell you who I am as it will cause much grief in the family,
>> but I also cant watch as this goes on. If my wife betrayed me like
>> that I would want someone to tell me. Good luck!
>> produces this error:
>>
>> Microsoft JET Database Engine error '80040e14'
>> Syntax error (missing operator) in query expression ''Hello Charlie,
>> you have no idea who I am but I thought you should know that your
>> wife has been spending your mortgage money on things other than
>> paying the bank. You also don't know that she has been hiding the
>> foreclosure letters from you and its on'.
>>
>>
>>
>> whats going on here?
>
> Probably the apostrophe but that;s just a guess. How was this query
> expression created?
>
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>

Re: very weird access/ASP error

am 28.09.2006 00:17:15 von reb01501

My preference is to use parameters, thereby avoiding all these stupid
delimiter issues, and providing the bonus of preventing sql injection*:

See here for a better, more secure way to execute your queries by using
parameter markers:
http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.db/msg/72e36562fee7804e

Personally, I prefer using stored procedures, or saved parameter queries
as
they are known in Access:

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

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1& selm=eHYxOyvaDHA.4020%40tk2msftngp13.phx.gbl

* http://mvp.unixwiz.net/techtips/sql-injection.html
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23



Joe Reynolds wrote:
> will this work?
>
> http://wiki.ittoolbox.com/index.php/FAQ:How_do_I_escape_sing le_quotes_in_SQL_queries%3F
>
> i tried it and it seems to work but i wanted your opinion
>
>
> "Bob Barrows [MVP]" wrote in message
> news:%23viOIpn4GHA.2464@TK2MSFTNGP06.phx.gbl...
>> Joe Reynolds wrote:
>>> i have a memo field in an access database. the ASP page enters data
>>> to this field just fine.... however the following test (dont ask):
>>>
>>> Hello Charlie,
>>>
>>> you have no idea who I am but I thought you should know that your
>>> wife has been spending your mortgage money on things other than
>>> paying the bank. You also don't know that she has been hiding the
>>> foreclosure letters from you and its only a matter of time before
>>> you are kicked out of your home that you spent so many years paying for.
>>> I cant tell you who I am as it will cause much grief in the family,
>>> but I also cant watch as this goes on. If my wife betrayed me like
>>> that I would want someone to tell me. Good luck!
>>> produces this error:
>>>
>>> Microsoft JET Database Engine error '80040e14'
>>> Syntax error (missing operator) in query expression ''Hello Charlie,
>>> you have no idea who I am but I thought you should know that your
>>> wife has been spending your mortgage money on things other than
>>> paying the bank. You also don't know that she has been hiding the
>>> foreclosure letters from you and its on'.
>>>
>>>
>>>
>>> whats going on here?
>>
>> Probably the apostrophe but that;s just a guess. How was this query
>> expression created?
>>
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: very weird access/ASP error

am 29.09.2006 13:02:34 von digger440uk

I have two functions, writeNiceData and readNiceData.
In there i replace single quotes in the string to something like &sq;
Then just use them when writing and reading from.

Joe Reynolds wrote:
> "Bob Barrows [MVP]" wrote in message
> news:%23viOIpn4GHA.2464@TK2MSFTNGP06.phx.gbl...
> > Joe Reynolds wrote:
> >> i have a memo field in an access database. the ASP page enters data
> >> to this field just fine.... however the following test (dont ask):
> >>
> >> Hello Charlie,
> >>
> >> you have no idea who I am but I thought you should know that your
> >> wife has been spending your mortgage money on things other than
> >> paying the bank. You also don't know that she has been hiding the
> >> foreclosure letters from you and its only a matter of time before you
> >> are kicked out of your home that you spent so many years paying for.
> >> I cant tell you who I am as it will cause much grief in the family,
> >> but I also cant watch as this goes on. If my wife betrayed me like
> >> that I would want someone to tell me. Good luck!
> >> produces this error:
> >>
> >> Microsoft JET Database Engine error '80040e14'
> >> Syntax error (missing operator) in query expression ''Hello Charlie,
> >> you have no idea who I am but I thought you should know that your
> >> wife has been spending your mortgage money on things other than
> >> paying the bank. You also don't know that she has been hiding the
> >> foreclosure letters from you and its on'.
> >>
> >>
> >>
> >> whats going on here?
> >
> > Probably the apostrophe but that;s just a guess. How was this query
> > expression created?
> >
> >
> > --
> > Microsoft MVP - ASP/ASP.NET
> > Please reply to the newsgroup. This email account is my spam trap so I
> > don't check it very often. If you must reply off-line, then remove the
> > "NO SPAM"
> >
> yup thats it. i take posted data from a text box and save it in a variable,
> then pass the variable in the SQL string.
> how can i fix this?