0
Participant
,
/t5/dreamweaver-discussions/create-asp-querystring-in-redirect-script/td-p/589688
Feb 08, 2007
Feb 08, 2007
Copy link to clipboard
Copied
I have an asp page containing an update record script and a
redirect script. Update record is filtered WHERE
contactid_mor="&Request.Form("contactid_mor")&" ")
I would like to pass on a querystring to the redirect page that is equivalent to companyid_mor which is a field in the same table as contactid_mor. How do I go about doing this? Do I create a recordset and then make the querysting equal to the recordset field?
The code follows:
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/access_db/products.mdb")
objConn.Open
objConn.Execute("UPDATE morecontacts_mor SET firstnm_mor='"&Request.Form("firstnm_mor")&"', lastnm_mor='"&Request.Form("lastnm_mor")&"', phone_mor='"&Request.Form("phone_mor")&"', altphone_mor='"&Request.Form("altphone_mor")&"', fax_mor='"&Request.Form("fax_mor")&"', cellphone_mor='"&Request.Form("cellphone_mor")&"', email_mor='"&Request.Form("email_mor")&"', altemail_mor='"&Request.Form("altemail_mor")&"' WHERE contactid_mor="&Request.Form("contactid_mor")&" ")
Response.Redirect("invoice.asp?customerid=%>
I would like to pass on a querystring to the redirect page that is equivalent to companyid_mor which is a field in the same table as contactid_mor. How do I go about doing this? Do I create a recordset and then make the querysting equal to the recordset field?
The code follows:
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/access_db/products.mdb")
objConn.Open
objConn.Execute("UPDATE morecontacts_mor SET firstnm_mor='"&Request.Form("firstnm_mor")&"', lastnm_mor='"&Request.Form("lastnm_mor")&"', phone_mor='"&Request.Form("phone_mor")&"', altphone_mor='"&Request.Form("altphone_mor")&"', fax_mor='"&Request.Form("fax_mor")&"', cellphone_mor='"&Request.Form("cellphone_mor")&"', email_mor='"&Request.Form("email_mor")&"', altemail_mor='"&Request.Form("altemail_mor")&"' WHERE contactid_mor="&Request.Form("contactid_mor")&" ")
Response.Redirect("invoice.asp?customerid=%>
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
LEGEND
,
Feb 08, 2007
Feb 08, 2007
The Server.Transfer method [1] does not support the
objective.
' fool around with this implementation...
dim sQueryStringValue
sQueryStringValue = "PuxatawneyPhil"
Response.Redirect("invoice.asp?customerid=" & sQueryStringValue)
--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
[1] http://msdn2.microsoft.com/en-us/library/ms525800.aspx
"aonefun" <webforumsuser@m...
' fool around with this implementation...
dim sQueryStringValue
sQueryStringValue = "PuxatawneyPhil"
Response.Redirect("invoice.asp?customerid=" & sQueryStringValue)
--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
[1] http://msdn2.microsoft.com/en-us/library/ms525800.aspx
"aonefun" <webforumsuser@m...
LEGEND
,
/t5/dreamweaver-discussions/create-asp-querystring-in-redirect-script/m-p/589689#M104705
Feb 08, 2007
Feb 08, 2007
Copy link to clipboard
Copied
Change your response.redirect to server.transfer and use the
form as though
it were submitted to that page
-or-
Add ?<%=Request.Form%> to the end of the redirect URL and the query string
values will have the same names as the form values.
"aonefun" <webforumsuser@macromedia.com> wrote in message
news:eqflse$o4e$1@forums.macromedia.com...
>I have an asp page containing an update record script and a redirect
>script.
> Update record is filtered WHERE
> contactid_mor="&Request.Form("contactid_mor")&"
> ")
>
> I would like to pass on a querystring to the redirect page that is
> equivalent
> to companyid_mor which is a field in the same table as contactid_mor. How
> do I
> go about doing this? Do I create a recordset and then make the querysting
> equal
> to the recordset field?
> The code follows:
>
>
> <%
> DIM objConn
> Set objConn = Server.CreateObject("ADODB.Connection")
> objConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ="
> &
> Server.MapPath("/access_db/products.mdb")
> objConn.Open
> objConn.Execute("UPDATE morecontacts_mor SET
> firstnm_mor='"&Request.Form("firstnm_mor")&"',
> lastnm_mor='"&Request.Form("lastnm_mor")&"',
> phone_mor='"&Request.Form("phone_mor")&"',
> altphone_mor='"&Request.Form("altphone_mor")&"',
> fax_mor='"&Request.Form("fax_mor")&"',
> cellphone_mor='"&Request.Form("cellphone_mor")&"',
> email_mor='"&Request.Form("email_mor")&"',
> altemail_mor='"&Request.Form("altemail_mor")&"' WHERE
> contactid_mor="&Request.Form("contactid_mor")&" ")
>
> Response.Redirect("invoice.asp?customerid=%>
>
it were submitted to that page
-or-
Add ?<%=Request.Form%> to the end of the redirect URL and the query string
values will have the same names as the form values.
"aonefun" <webforumsuser@macromedia.com> wrote in message
news:eqflse$o4e$1@forums.macromedia.com...
>I have an asp page containing an update record script and a redirect
>script.
> Update record is filtered WHERE
> contactid_mor="&Request.Form("contactid_mor")&"
> ")
>
> I would like to pass on a querystring to the redirect page that is
> equivalent
> to companyid_mor which is a field in the same table as contactid_mor. How
> do I
> go about doing this? Do I create a recordset and then make the querysting
> equal
> to the recordset field?
> The code follows:
>
>
> <%
> DIM objConn
> Set objConn = Server.CreateObject("ADODB.Connection")
> objConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ="
> &
> Server.MapPath("/access_db/products.mdb")
> objConn.Open
> objConn.Execute("UPDATE morecontacts_mor SET
> firstnm_mor='"&Request.Form("firstnm_mor")&"',
> lastnm_mor='"&Request.Form("lastnm_mor")&"',
> phone_mor='"&Request.Form("phone_mor")&"',
> altphone_mor='"&Request.Form("altphone_mor")&"',
> fax_mor='"&Request.Form("fax_mor")&"',
> cellphone_mor='"&Request.Form("cellphone_mor")&"',
> email_mor='"&Request.Form("email_mor")&"',
> altemail_mor='"&Request.Form("altemail_mor")&"' WHERE
> contactid_mor="&Request.Form("contactid_mor")&" ")
>
> Response.Redirect("invoice.asp?customerid=%>
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/create-asp-querystring-in-redirect-script/m-p/589690#M104706
Feb 08, 2007
Feb 08, 2007
Copy link to clipboard
Copied
The Server.Transfer method [1] does not support the
objective.
' fool around with this implementation...
dim sQueryStringValue
sQueryStringValue = "PuxatawneyPhil"
Response.Redirect("invoice.asp?customerid=" & sQueryStringValue)
--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
[1] http://msdn2.microsoft.com/en-us/library/ms525800.aspx
"aonefun" <webforumsuser@macromedia.com> wrote in message
news:eqflse$o4e$1@forums.macromedia.com...
>I have an asp page containing an update record script and a redirect
>script.
> Update record is filtered WHERE
> contactid_mor="&Request.Form("contactid_mor")&"
> ")
>
> I would like to pass on a querystring to the redirect page that is
> equivalent
> to companyid_mor which is a field in the same table as contactid_mor. How
> do I
> go about doing this? Do I create a recordset and then make the querysting
> equal
> to the recordset field?
> The code follows:
>
>
> <%
> DIM objConn
> Set objConn = Server.CreateObject("ADODB.Connection")
> objConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ="
> &
> Server.MapPath("/access_db/products.mdb")
> objConn.Open
> objConn.Execute("UPDATE morecontacts_mor SET
> firstnm_mor='"&Request.Form("firstnm_mor")&"',
> lastnm_mor='"&Request.Form("lastnm_mor")&"',
> phone_mor='"&Request.Form("phone_mor")&"',
> altphone_mor='"&Request.Form("altphone_mor")&"',
> fax_mor='"&Request.Form("fax_mor")&"',
> cellphone_mor='"&Request.Form("cellphone_mor")&"',
> email_mor='"&Request.Form("email_mor")&"',
> altemail_mor='"&Request.Form("altemail_mor")&"' WHERE
> contactid_mor="&Request.Form("contactid_mor")&" ")
>
> Response.Redirect("invoice.asp?customerid=%>
>
' fool around with this implementation...
dim sQueryStringValue
sQueryStringValue = "PuxatawneyPhil"
Response.Redirect("invoice.asp?customerid=" & sQueryStringValue)
--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
[1] http://msdn2.microsoft.com/en-us/library/ms525800.aspx
"aonefun" <webforumsuser@macromedia.com> wrote in message
news:eqflse$o4e$1@forums.macromedia.com...
>I have an asp page containing an update record script and a redirect
>script.
> Update record is filtered WHERE
> contactid_mor="&Request.Form("contactid_mor")&"
> ")
>
> I would like to pass on a querystring to the redirect page that is
> equivalent
> to companyid_mor which is a field in the same table as contactid_mor. How
> do I
> go about doing this? Do I create a recordset and then make the querysting
> equal
> to the recordset field?
> The code follows:
>
>
> <%
> DIM objConn
> Set objConn = Server.CreateObject("ADODB.Connection")
> objConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ="
> &
> Server.MapPath("/access_db/products.mdb")
> objConn.Open
> objConn.Execute("UPDATE morecontacts_mor SET
> firstnm_mor='"&Request.Form("firstnm_mor")&"',
> lastnm_mor='"&Request.Form("lastnm_mor")&"',
> phone_mor='"&Request.Form("phone_mor")&"',
> altphone_mor='"&Request.Form("altphone_mor")&"',
> fax_mor='"&Request.Form("fax_mor")&"',
> cellphone_mor='"&Request.Form("cellphone_mor")&"',
> email_mor='"&Request.Form("email_mor")&"',
> altemail_mor='"&Request.Form("altemail_mor")&"' WHERE
> contactid_mor="&Request.Form("contactid_mor")&" ")
>
> Response.Redirect("invoice.asp?customerid=%>
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
aonefun
AUTHOR
Participant
,
/t5/dreamweaver-discussions/create-asp-querystring-in-redirect-script/m-p/589691#M104707
Feb 08, 2007
Feb 08, 2007
Copy link to clipboard
Copied
excuse my naivete, but would such a statement or syntax be
possible? it's giving me "expected end of statement" errors.
sQueryStringValue = "Recordset1.Fields.Item("customerid_mor").Value"
sQueryStringValue = "Recordset1.Fields.Item("customerid_mor").Value"
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/create-asp-querystring-in-redirect-script/m-p/589692#M104708
Feb 09, 2007
Feb 09, 2007
Copy link to clipboard
Copied
Despite its current sparse UI the ASP FAQ [1] is an amazing
resource. Go
there and type the error message into the search textbox. I'm doing C# these
days and wrote the snippet from memory. I'm not too sharp on ASP errors
lately but I think I do see the problem with your code; remove the
quotations from the reference to the property of the Field...
sQueryStringValue = Recordset1.Fields.Item("customerid_mor").Value
--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
[]1 http://aspfaq.com/
"aonefun" <webforumsuser@macromedia.com> wrote in message
news:eqgt32$8j5$1@forums.macromedia.com...
> excuse my naivete, but would such a statement or syntax be possible? it's
> giving me "expected end of statement" errors.
>
> sQueryStringValue = "Recordset1.Fields.Item("customerid_mor").Value"
there and type the error message into the search textbox. I'm doing C# these
days and wrote the snippet from memory. I'm not too sharp on ASP errors
lately but I think I do see the problem with your code; remove the
quotations from the reference to the property of the Field...
sQueryStringValue = Recordset1.Fields.Item("customerid_mor").Value
--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
[]1 http://aspfaq.com/
"aonefun" <webforumsuser@macromedia.com> wrote in message
news:eqgt32$8j5$1@forums.macromedia.com...
> excuse my naivete, but would such a statement or syntax be possible? it's
> giving me "expected end of statement" errors.
>
> sQueryStringValue = "Recordset1.Fields.Item("customerid_mor").Value"
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

