I use this code to update a database with an email address,I would like to update a different database using the same form so the users do not have to do it twice.
The other database is on E but not in test its in the root of my site and its called users.mdb
Response.Buffer = true
dim cnn,rst
set cnn = Server.CreateObject("ADODB.Connection"
set rst = Server.CreateObject("ADODB.RecordSet"
cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=E:/Test/testdatabase.mdb;"
sqltext = "SELECT * FROM Testdatabase"
rst.Open sqltext,cnn,3,3
dim Email
Email = Request.Form("Email"
if Email = "" then
error = "You have not entered an Email address.please click back"
Response.Write error
Response.End
end if
rst.AddNew
rst("Email" = Email
rst.update
%>
The other database is on E but not in test its in the root of my site and its called users.mdb
Response.Buffer = true
dim cnn,rst
set cnn = Server.CreateObject("ADODB.Connection"
set rst = Server.CreateObject("ADODB.RecordSet"
cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=E:/Test/testdatabase.mdb;"
sqltext = "SELECT * FROM Testdatabase"
rst.Open sqltext,cnn,3,3
dim Email
Email = Request.Form("Email"
if Email = "" then
error = "You have not entered an Email address.please click back"
Response.Write error
Response.End
end if
rst.AddNew
rst("Email" = Email
rst.update
%>