D
digitalmelon
Guest
Ok here is the scenario.
I have a five step registration process. Hence I am using 5 forms. When each form is submitted the data from the form is posted to the database and the user is then sent to the next form. The problem I have having is between forms 1 and 2. When form 1 is posted to the database with the persons personal information including username and password they are given an ID number(autonumber - MS Access DB). The problem is that I need that ID number in the second form. This is how I get the ID number from the DB:
//////////////////
Set rs = Server.Createobject("ADODB.Recordset")
sql2 = "SELECT * FROM DEL_TABLE"
rs.open sql2,conn,3,3
rs.movelast
ID = rs("ID")
rs.close
set rs=nothing
Application.Unlock
'FOR DEBUGGING
'response.write SQL
response.redirect "regstep2.asp?ID=" & ID
//////////////////
Heres the problem. If I let it run the way it is above and move to the next form then the SQL statement does NOT post the data to the database. BUT, if I comment out the response.redirect and uncomment the response.write SQL then it DOES post the data to the database.
Can anyone of you ASP gurus out there make any sense of that? I hope this makes some sense.
Thanks in advance
I have a five step registration process. Hence I am using 5 forms. When each form is submitted the data from the form is posted to the database and the user is then sent to the next form. The problem I have having is between forms 1 and 2. When form 1 is posted to the database with the persons personal information including username and password they are given an ID number(autonumber - MS Access DB). The problem is that I need that ID number in the second form. This is how I get the ID number from the DB:
//////////////////
Set rs = Server.Createobject("ADODB.Recordset")
sql2 = "SELECT * FROM DEL_TABLE"
rs.open sql2,conn,3,3
rs.movelast
ID = rs("ID")
rs.close
set rs=nothing
Application.Unlock
'FOR DEBUGGING
'response.write SQL
response.redirect "regstep2.asp?ID=" & ID
//////////////////
Heres the problem. If I let it run the way it is above and move to the next form then the SQL statement does NOT post the data to the database. BUT, if I comment out the response.redirect and uncomment the response.write SQL then it DOES post the data to the database.
Can anyone of you ASP gurus out there make any sense of that? I hope this makes some sense.
Thanks in advance