Hello,I'm taking my first few steps in the asp playground and I need a little help understading why my page is hanging on the record set update. Can anyone help me troubleshoot? I stepped thru the page line by line and the error comes up after: rsAddComments.UpdateBest,NewbieDev
<%'Dimension variablesDim adoCon 'Holds the Database Connection ObjectDim rsAddComments 'Holds the recordset for the new record to be addedDim strSQL 'Holds the SQL query to query the database'Create an ADO connection objectSet adoCon = Server.CreateObject("ADODB.Connection")'Set an active connection to the Connection object using a DSN-less connectionadoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbook.mdb")'Create an ADO recordset objectSet rsAddComments = Server.CreateObject("ADODB.Recordset")'Initialise the strSQL variable with an SQL statement to query the databasestrSQL = "SELECT tblComments.Name, tblComments.Comments FROM tblComments;"'Set the cursor type we are using so we can navigate through the recordsetrsAddComments.CursorType = 2'Set the lock type so that the record is locked by ADO when it is updatedrsAddComments.LockType = 3'Open the recordset with the SQL query rsAddComments.Open strSQL, adoCon'Tell the recordset we are adding a new record to itrsAddComments.AddNew'Add a new record to the recordsetrsAddComments.Fields("Name") = Request.Form("name")rsAddComments.Fields("Comments") = Request.Form("comments")'Write the updated recordset to the databasersAddComments.Update'Reset server objectsrsAddComments.CloseSet rsAddComments = NothingSet adoCon = Nothing'Redirect to the guestbook.asp pageResponse.Redirect "guestbook.asp"%>