Hi,
Can anybody help me here pls? The code below writes the contents to a access db. However, how do i pass the "strPID" variable to the next page?
Thanks in advance..
<%
'Dimension variables
Dim adoCon
Dim rsAddProperty
Dim strSQL
Dim strPID
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("property.mdb")
Set rsAddProperty = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM TBL_PROP;"
rsAddProperty.LockType = 3
rsAddProperty.Open strSQL, adoCon
rsAddProperty.AddNew
rsAddProperty.Fields("ADDRESS") = Request.Form("ADDRESS")
rsAddProperty.Fields("POSTCODE") = Request.Form("POSTCODE")
rsAddProperty.Fields("DESCRIPTION") = Request.Form("DESCRIPTION")
strPID=rsAddProperty("PID")
'Reset server objects
rsAddProperty.Close
Set rsAddProperty = Nothing
Set adoCon = Nothing
Response.Redirect "page2.asp"
%>
Can anybody help me here pls? The code below writes the contents to a access db. However, how do i pass the "strPID" variable to the next page?
Thanks in advance..
<%
'Dimension variables
Dim adoCon
Dim rsAddProperty
Dim strSQL
Dim strPID
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("property.mdb")
Set rsAddProperty = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM TBL_PROP;"
rsAddProperty.LockType = 3
rsAddProperty.Open strSQL, adoCon
rsAddProperty.AddNew
rsAddProperty.Fields("ADDRESS") = Request.Form("ADDRESS")
rsAddProperty.Fields("POSTCODE") = Request.Form("POSTCODE")
rsAddProperty.Fields("DESCRIPTION") = Request.Form("DESCRIPTION")
strPID=rsAddProperty("PID")
'Reset server objects
rsAddProperty.Close
Set rsAddProperty = Nothing
Set adoCon = Nothing
Response.Redirect "page2.asp"
%>