Trouble with DSNless Connection to an Access Database
Trouble with DSNless Connection to an Access Database
am 21.01.2008 19:20:07 von coloradocamper
I installed IIS 5.1 on my XP Pro CPU with the intention of developing
a DSNless connection to an Access database. I developed some sample
code for all the edits (updates), adds, deletes, etc. and it worked
fine a few years ago on IIS 4.0. On IIS 5.1, it reads and displays the
database just fine; however, updates, deletes, and additions to the
database results in errors. The following is the error result using a
post to update the data.
Database Errors Occurred
UPDATE table1 SET Name='', Phone='' WHERE ID=
Error #-2147217900
Error desc. -> [Microsoft][ODBC Microsoft Access Driver] Syntax error
(missing operator) in query expression 'ID='.
Is it possible that I have IIS 5.1 configured incorrectly where it
does not allow anonymous data updates through the http interface?
Anyone have any ideas or possibly some sample ASP code to provide a
DSNless connection to an Access database that's known to work on IIS
5.1? I need to be able to query, edit, delete, and add new records to
the database. I placed my very "simple" sample code at
http://home.comcast.net/~colorado.camper/db_test.zip Can someone with
IIS 5.1 run my code and let me know if it works okay or requires
modification. If it works on someone else's IIS, then it's likely that
I'm configured incorrectly.
Thanks!
Re: Trouble with DSNless Connection to an Access Database
am 21.01.2008 20:44:24 von Trevor Benedict R
I don't think the issue is with IIS 5.1. If you look at the error message,
it states that the there is a missing perator.
An update statement would look like this "UPDATE table1 SET Name='',
Phone='' WHERE ID=123" for example. You are missing the actual value that
gets substitued for the ID. I would suggest that you look at your code.
I believe the error is here. Change this line to something like
on error resume next
dataname=request.form("name")
dataphone=request.form("phone")
dataid=request.form("id")
Response.write "dataname=" & request.form("name") & "
"
Response.write "dataphone=" & request.form("phone") & "
"
Response.write "dataid=" & request.form("id") & "
"
Response.End
Find out what values are being printed out of these output statments. If you
don't get anything, then this could be the source of the problem on the
update portion. You still need to figure out why it did not send the
contents over when posted.
The On Error Resume Next is dangerous by itself, unless you check for Errors
all long the execution path.
You will also get better answers if you direct this question to the ASP
Newsgroup
Regards,
Trevor Benedict
MCSD
"ColoradoCamper" wrote in message
news:cccb6e13-26da-43a7-bee5-dd4ede9375f7@i12g2000prf.google groups.com...
>I installed IIS 5.1 on my XP Pro CPU with the intention of developing
> a DSNless connection to an Access database. I developed some sample
> code for all the edits (updates), adds, deletes, etc. and it worked
> fine a few years ago on IIS 4.0. On IIS 5.1, it reads and displays the
> database just fine; however, updates, deletes, and additions to the
> database results in errors. The following is the error result using a
> post to update the data.
>
> Database Errors Occurred
> UPDATE table1 SET Name='', Phone='' WHERE ID=
> Error #-2147217900
> Error desc. -> [Microsoft][ODBC Microsoft Access Driver] Syntax error
> (missing operator) in query expression 'ID='.
>
> Is it possible that I have IIS 5.1 configured incorrectly where it
> does not allow anonymous data updates through the http interface?
> Anyone have any ideas or possibly some sample ASP code to provide a
> DSNless connection to an Access database that's known to work on IIS
> 5.1? I need to be able to query, edit, delete, and add new records to
> the database. I placed my very "simple" sample code at
> http://home.comcast.net/~colorado.camper/db_test.zip Can someone with
> IIS 5.1 run my code and let me know if it works okay or requires
> modification. If it works on someone else's IIS, then it's likely that
> I'm configured incorrectly.
>
> Thanks!
Re: Trouble with DSNless Connection to an Access Database
am 23.01.2008 08:06:04 von coloradocamper
On Jan 21, 12:44=A0pm, "Trevor Benedict" wrote:
> I don't think the issue is with IIS 5.1. If you look at the error message,=
> it states that the there is a missing perator.
>
> An update statement would look like this "UPDATE table1 SET Name=3D'',
> Phone=3D'' WHERE ID=3D123" for example. You are missing the actual value t=
hat
> gets substitued for the ID. I would suggest that you look at your code.
>
> I believe the error is here. Change this line to something like
>
> on error resume next
> dataname=3Drequest.form("name")
> dataphone=3Drequest.form("phone")
> dataid=3Drequest.form("id")
>
> Response.write "dataname=3D" & request.form("name") & "
"
> Response.write "dataphone=3D" & request.form("phone") =A0& "
"
> Response.write "dataid=3D" & request.form("id") & "
"
> Response.End
>
> Find out what values are being printed out of these output statments. If y=
ou
> don't get anything, then this could be the source of the problem on the
> update portion. You still need to figure out why it did not send the
> contents over when posted.
>
> The On Error Resume Next is dangerous by itself, unless you check for Erro=
rs
> all long the execution path.
>
> You will also get better answers if you direct this question to the ASP
> Newsgroup
>
> Regards,
>
> Trevor Benedict
> MCSD
>
> "ColoradoCamper" wrote in message
>
> news:cccb6e13-26da-43a7-bee5-dd4ede9375f7@i12g2000prf.google groups.com...
>
>
>
> >I installed IIS 5.1 on my XP Pro CPU with the intention of developing
> > a DSNless connection to an Access database. I developed some sample
> > code for all the edits (updates), adds, deletes, etc. and it worked
> > fine a few years ago on IIS 4.0. On IIS 5.1, it reads and displays the
> > database just fine; however, updates, deletes, and additions to the
> > database results in errors. The following is the error result using a
> > post to update the data.
>
> > Database Errors Occurred
> > UPDATE table1 SET Name=3D'', Phone=3D'' WHERE ID=3D
> > Error #-2147217900
> > Error desc. -> [Microsoft][ODBC Microsoft Access Driver] Syntax error
> > (missing operator) in query expression 'ID=3D'.
>
> > Is it possible that I have IIS 5.1 configured incorrectly where it
> > does not allow anonymous data updates through the http interface?
> > Anyone have any ideas or possibly some sample ASP code to provide a
> > DSNless connection to an Access database that's known to work on IIS
> > 5.1? I need to be able to query, edit, delete, and add new records to
> > the database. I placed my very "simple" sample code at
> >http://home.comcast.net/~colorado.camper/db_test.zipCan someone with
> > IIS 5.1 run my code and let me know if it works okay or requires
> > modification. If it works on someone else's IIS, then it's likely that
> > I'm configured incorrectly.
>
> > Thanks!- Hide quoted text -
>
> - Show quoted text -
Trevor,
I confirmed my code is "perfect" from a friend also running IIS 5.1.
It appears that there's a problem with the MS installation of IIS 5.1
on my XP Pro box. I may be faced with a total reinstallation of my OS
-- I hate to loose the time required to do this, It was interesting to
note that my friend's localhost default screen (i.e., localstart.asp)
looked different than mine. humm.... In addition, I noticed that when
I select the http://localhost/localstart.asp, I receive an error "The
page cannot be displayed" for the Online Documentation link. This is
all very strange and frustrating.
Re: Trouble with DSNless Connection to an Access Database
am 23.01.2008 17:10:53 von coloradocamper
On Jan 21, 12:44=A0pm, "Trevor Benedict" wrote:
> I don't think the issue is with IIS 5.1. If you look at the error message,=
> it states that the there is a missing perator.
>
> An update statement would look like this "UPDATE table1 SET Name=3D'',
> Phone=3D'' WHERE ID=3D123" for example. You are missing the actual value t=
hat
> gets substitued for the ID. I would suggest that you look at your code.
>
> I believe the error is here. Change this line to something like
>
> on error resume next
> dataname=3Drequest.form("name")
> dataphone=3Drequest.form("phone")
> dataid=3Drequest.form("id")
>
> Response.write "dataname=3D" & request.form("name") & "
"
> Response.write "dataphone=3D" & request.form("phone") =A0& "
"
> Response.write "dataid=3D" & request.form("id") & "
"
> Response.End
>
> Find out what values are being printed out of these output statments. If y=
ou
> don't get anything, then this could be the source of the problem on the
> update portion. You still need to figure out why it did not send the
> contents over when posted.
>
> The On Error Resume Next is dangerous by itself, unless you check for Erro=
rs
> all long the execution path.
>
> You will also get better answers if you direct this question to the ASP
> Newsgroup
>
> Regards,
>
> Trevor Benedict
> MCSD
>
> "ColoradoCamper" wrote in message
>
> news:cccb6e13-26da-43a7-bee5-dd4ede9375f7@i12g2000prf.google groups.com...
>
>
>
> >I installed IIS 5.1 on my XP Pro CPU with the intention of developing
> > a DSNless connection to an Access database. I developed some sample
> > code for all the edits (updates), adds, deletes, etc. and it worked
> > fine a few years ago on IIS 4.0. On IIS 5.1, it reads and displays the
> > database just fine; however, updates, deletes, and additions to the
> > database results in errors. The following is the error result using a
> > post to update the data.
>
> > Database Errors Occurred
> > UPDATE table1 SET Name=3D'', Phone=3D'' WHERE ID=3D
> > Error #-2147217900
> > Error desc. -> [Microsoft][ODBC Microsoft Access Driver] Syntax error
> > (missing operator) in query expression 'ID=3D'.
>
> > Is it possible that I have IIS 5.1 configured incorrectly where it
> > does not allow anonymous data updates through the http interface?
> > Anyone have any ideas or possibly some sample ASP code to provide a
> > DSNless connection to an Access database that's known to work on IIS
> > 5.1? I need to be able to query, edit, delete, and add new records to
> > the database. I placed my very "simple" sample code at
> >http://home.comcast.net/~colorado.camper/db_test.zipCan someone with
> > IIS 5.1 run my code and let me know if it works okay or requires
> > modification. If it works on someone else's IIS, then it's likely that
> > I'm configured incorrectly.
>
> > Thanks!- Hide quoted text -
>
> - Show quoted text -
I found the solution to my problem at http://support.microsoft.com/kb/175168=
..
It was a security setting problem with the Internet Guest account
(IUSR_MACHINE). Yaaa -- I don't need to rebuild my OS!
Re: Trouble with DSNless Connection to an Access Database
am 24.01.2008 00:47:36 von Trevor Benedict R
Glad you were able to resolve the issue :)
Regards,
Trevor Benedict
MCSD
"ColoradoCamper" wrote in message
news:171d7a75-f1f1-420b-b10a-4da8c7d939a5@v4g2000hsf.googleg roups.com...
I found the solution to my problem at
http://support.microsoft.com/kb/175168.
It was a security setting problem with the Internet Guest account
(IUSR_MACHINE). Yaaa -- I don't need to rebuild my OS!