Hi,
I have the following script which processes the html form and inserts into 3 tables. How can I pass the value of the variable EDSID to the next page using response.redirect?
Been trying to crack this for a while and it's doing my head in, any help would be appreciated.
Cheers,
<%
' Declaring variables
Dim EDSID, FirstName, data_source, con, sql_insert, sql_insert2, sql_insert3
' A Function to check if some field entered by user is empty
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
' Receiving values from Form
EDSID = ChkString(Request.Form("EDSID"))
FirstName = ChkString(Request.Form("FirstName"))
data_source = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=**********.mdb;" & "Persist Security Info=False"
sql_insert = "insert into CREDITORS (EDSID) values ('" & _
EDSID & "')"
sql_insert2 = "insert into CALLS (EDSID) values ('" & _
EDSID & "')"
sql_insert3 = "insert into DEBT (EDSID, FirstName) values ('" & _
EDSID & "', '" & FirstName & "')"
' Creating Connection Object and opening the database
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_insert
con.Execute sql_insert2
con.Execute sql_insert3
' Done. Close the connection
con.Close
Set con = Nothing
Response.Redirect = "statement.asp?EDSID=ChkString(Request.Form("EDSID "))"
%>