Can you please tell me what is wrong with this script why it is not adding recoreds to the DB?
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rswedding 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query to query the database
Dim strDbPathAndName 'Holds the path and name of the database
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
strDbPathAndName ="C:\Inetpub\DB\wedding.mdb"
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & strDbPathAndName
'Create an ADO recordset object
Set rswedding = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT gues.surename, gues.name1, gues.name2, gues.childname, gues.hophone, gues.workphone, gues.mobphone, gues.email, gues.guestnum, gues.checkbox, gues.text FROM gues;"
'Set the cursor type we are using so we can navigate through the recordset
rswedding.CursorType = 2
'Set the lock type so that the record is locked by ADO when it is updated
rswedding.LockType = 3
'Open the recordset with the SQL query
rswedding.Open strSQL, adoCon
rswedding.AddNew
'Add a new record to the recordset
rswedding.Fields("surename") = Request.Form("surename")
rswedding.Fields("Name1") = Request.Form("name1")
rswedding.Fields("Name2") = Request.Form("name2")
rswedding.Fields("childname") = Request.Form("childname")
rswedding.Fields("hophone") = Request.Form("hophone")
rswedding.Fields("workphone") = Request.Form("workphone")
rswedding.Fields("mobphone") = Request.Form("mobphone")
rswedding.Fields("email") = Request.Form("email")
rswedding.Fields("guestnum") = Request.Form("guestnum")
rswedding.Fields("checkbox") = Request.Form("checkbox")
rswedding.Fields("text") = Request.Form("text")
'Write the updated recordset to the database
rswedding.Update
'Reset server objects
rswedding.Close
Set rswedding = Nothing
'Set adoCon = Nothing
Response.Redirect "register.asp"
%>