This is a multi-part message in MIME format.
------=_NextPart_000_0035_01C6DB0A.167ACBA0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
BlankI sent the post below to an Access newsgroup, but I think it may a
vbscript problem.
As a further test, I added this code to update_password.asp:
Response.write "update_form.asp?ID=" & Request.QueryString("ID")
update_password.asp was called by
<%="<a href=""update_password.asp?ID=" & FP_FieldVal(fp_rs,"ID") &
""">"%>Update</a>
update_password.asp was loaded, with the address bar:
http://trevorl.mvps.org/update_password.asp?ID=21
update_password.asp displayed:
update_form.asp?ID=
So I guess the query is why is Request.QueryString("ID") not returning a
value when the ID shows in the address bar
Any files needed can be extracted from http://trevorl.mvps.org/mvpweb.zip
---- Original Message ----
From: Trevor L.
Newsgroups: microsoft.private.mvp.access
Sent: Sunday, September 17, 2006 5:15 PM
Subject: Re: Passing parameter strings in ASP of ID for an Access DB
> I have several ASP files for reading and updating an Access database
>
> guestbook.asp which reads the entire database and has the line at the
> bottom
> <a href="update_password.asp">Update Comment on Guestbook</a><br />
>
> update_password.asp accepts the password and calls
> update_guestbook.asp
> update_guestbook.asp reads the entire database again and calls
> udpate_form.asp with ID= the value for the recordset
> update_form reads the database for the selected record and calls
> udpate_entry for that record
> udpate_entry does the actual update
>
> I would prefer that the datbase not be read so many times
> My idea is:
> guestbook.asp has an entry against each record
> <%="<a href=""update_password.asp?ID=" & FP_FieldVal(fp_rs,"ID") &
> """>Update</a>"%>
> so that when Update is clicked it calls update_password.asp which
> then passes the ID to udpate_form.asp and subsequently to
> udpate_entry.asp
>
> The ASP files are attached
> There are also some other .inc files but they appear to do the job
> they should (most are FrontPage generated)
>
> My problem is that I cannot sucessfully pass the parameter ID from
> guestbook.asp to update_password.asp to update_form.asp. I either get
> a missing ID (e.g. ?ID= rather than ID=21) and/or a syntax error
>
> I can pass it from guestbook.asp to update_password.asp but this uses
> FP_FieldVal(fp_rs,"ID")
>
> When I try to pass it from update_password to udpate_form using:
> Response.Redirect "update_form.asp?ID=" & Request.QueryString("ID")
> I get the message:
> Microsoft JET Database Engine error '80040e14'
> Syntax error (missing operator) in query expression 'ID='.
> /update_form.asp, line 34
> Line 34 is
> rsUpdateEntry.Open strSQL, adoCon
>
> I also tried this in update_form.asp:
> strSQL = "SELECT * FROM Results WHERE ID=" &
> Clng(Request.QueryString("ID"))
> I got the message:
> Microsoft VBScript runtime error '800a000d'
> Type mismatch: 'Clng'
> /update_form.asp, line 25
>
> CStr(Request.QueryString("ID")) does not work either
>
> The address line reads
> http://trevorl.mvps.org/update_form.asp?ID=
>
> What do I have to do ?
--
Thanks,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
------=_NextPart_000_0035_01C6DB0A.167ACBA0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE id=3DridTitle>Blank</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252"><BASE=20
href=3D"file://C:\Program Files\Common Files\Microsoft =
Shared\Stationery\">
<STYLE><!-- body { font-family: Arial, Helvetica; font-size: 10pt; =
color: #000000; margin-top: 25px; margin-left: 25px; } P.msoNormal, =
LI.msoNormal { font-family: Helvetica, "Times New Roman"; font-size: =
10pt; margin-top: 0px; margin-left: 0px; color: "#ffffcc"; } --></STYLE>
<META content=3D"MSHTML 6.00.2900.2963" name=3DGENERATOR></HEAD>
<BODY id=3DridBody bgColor=3D#ffffff background=3D"Blank Bkgrd.gif">
<DIV>
<DIV>I sent the post below to an Access newsgroup, but I think it may a =
vbscript=20
problem.</DIV>
<DIV> </DIV>
<DIV>As a further test, I added this code to update_password.asp:
<DIV>Response.write "update_form.asp?ID=3D" & =
Request.QueryString("ID")</DIV>
<DIV> </DIV></DIV>
<DIV>update_password.asp was called by</DIV>
<DIV><%=3D"<a href=3D""update_password.asp?ID=3D" & =
FP_FieldVal(fp_rs,"ID")=20
& """>"%>Update</a></DIV>
<DIV> </DIV>
<DIV>update_password.asp was loaded, with the address bar:
<DIV><A=20
href=3D"http://trevorl.mvps.org/update_password.asp?ID=3D21">http://trevo=
rl.mvps.org/update_password.asp?ID=3D21</A></DIV></DIV>
<DIV> </DIV>
<DIV>update_password.asp displayed:</DIV>
<DIV>update_form.asp?ID=3D</DIV>
<DIV> </DIV>
<DIV>So I guess the query is why is Request.QueryString("ID") not =
returning a=20
value when the ID shows in the address bar</DIV>
<DIV> </DIV>
<DIV>Any files needed can be extracted from <A class=3D0=20
href=3D"http://trevorl.mvps.org/mvpweb.zip"><FONT=20
color=3D#000000>http://trevorl.mvps.org/mvpweb.zip</FONT></A><BR></DIV>
<DIV>---- Original Message ----<BR>From: Trevor L.<BR>Newsgroups:=20
microsoft.private.mvp.access<BR>Sent: Sunday, September 17, 2006 5:15=20
PM<BR>Subject: Re: Passing parameter strings in ASP of ID for an Access=20
DB<BR><BR>> I have several ASP files for reading and updating an =
Access=20
database<BR>> <BR>> guestbook.asp which reads the entire database =
and has=20
the line at the<BR>> bottom <BR>> <a=20
href=3D"update_password.asp">Update Comment on =
Guestbook</a><br=20
/><BR>> <BR>> update_password.asp accepts the password and=20
calls<BR>> update_guestbook.asp <BR>> update_guestbook.asp reads =
the=20
entire database again and calls<BR>> udpate_form.asp with ID=3D the =
value for=20
the recordset <BR>> update_form reads the database for the selected =
record=20
and calls<BR>> udpate_entry for that record <BR>> udpate_entry =
does the=20
actual update<BR>> <BR>> I would prefer that the datbase not be =
read so=20
many times<BR>> My idea is:<BR>> guestbook.asp has an entry =
against=20
each record<BR>> <%=3D"<a href=3D""update_password.asp?ID=3D" =
&=20
FP_FieldVal(fp_rs,"ID") &<BR>> """>Update</a>"%> =
<BR>> so=20
that when Update is clicked it calls update_password.asp which<BR>> =
then=20
passes the ID to udpate_form.asp and subsequently to<BR>>=20
udpate_entry.asp <BR>> <BR>> The ASP files are =
attached<BR>>=20
There are also some other .inc files but they appear to do the =
job<BR>> they=20
should (most are FrontPage generated) <BR>> <BR>> My problem is =
that I=20
cannot sucessfully pass the parameter ID from<BR>> guestbook.asp to=20
update_password.asp to update_form.asp. I either get<BR>> a missing =
ID (e.g.=20
?ID=3D rather than ID=3D21) and/or a syntax error <BR>> =
<BR>> I can pass=20
it from guestbook.asp to update_password.asp but this uses<BR>>=20
FP_FieldVal(fp_rs,"ID") <BR>> <BR>> When I try to pass it from=20
update_password to udpate_form using:<BR>> Response.Redirect=20
"update_form.asp?ID=3D" & Request.QueryString("ID")<BR>> I get =
the=20
message:<BR>> Microsoft JET Database Engine error '80040e14'<BR>> =
Syntax=20
error (missing operator) in query expression 'ID=3D'.<BR>> =
/update_form.asp,=20
line 34<BR>> Line 34 is<BR>> rsUpdateEntry.Open strSQL, =
adoCon<BR>>=20
<BR>> I also tried this in update_form.asp:<BR>> strSQL =3D =
"SELECT * FROM=20
Results WHERE ID=3D" &<BR>> Clng(Request.QueryString("ID")) =
<BR>> I got=20
the message:<BR>> Microsoft VBScript runtime error '800a000d'<BR>> =
Type=20
mismatch: 'Clng'<BR>> /update_form.asp, line 25<BR>> <BR>>=20
CStr(Request.QueryString("ID")) does not work either<BR>> <BR>> =
The=20
address line reads<BR>> <A=20
href=3D"http://trevorl.mvps.org/update_form.asp?ID">http://trevorl.mvps.o=
rg/update_form.asp?ID</A>=3D<BR>>=20
<BR>> What do I have to do ?<BR><BR>-- <BR>Thanks,<BR>Trevor L.<BR>[=20
Microsoft MVP - FrontPage ]<BR>MVPS Website: <A=20
href=3D"http://trevorl.mvps.org/">http://trevorl.mvps.org/</A></DIV></DIV=
>
<P> </P></BODY></HTML>
------=_NextPart_000_0035_01C6DB0A.167ACBA0--