Hello,
Could anyone help me, I keep getting a 500 HTTP error when I try to add a new record from my form.html. I have no idea where the error is. any suggestion is more than welcome. Thank you in advance.
Could anyone help me, I keep getting a 500 HTTP error when I try to add a new record from my form.html. I have no idea where the error is. any suggestion is more than welcome. Thank you in advance.
Code:
****Insert.asp**** <% Dim objConn Dim objRS Dim SQL Set objConn = Server.CreateObject("ADODB.Connection") Set objRS = Server.CreateObject("ADODB.Recordset") objConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\db\Data.mdb") SQL= "SELECT first, Last, middle FROM DataTable;" objRS.CursorType = 2 objRS.LockType = 3 objRS.Open SQL, objConn objRS.AddNew objRS.Fields("first") = Request.Form("first") objRS.Fields("Last") = Request.Form("Last") objRS.Fields("middle") = Request.Form("middle") objRS.Update objRS.Close Set objRS = Nothing Set objConn = Nothing %>
Code:
***** Form.html**** <html><head><title></title></head> <body> <form name="form" method="post" action="Insert.asp"> first: <input type="text" name="first"> <br> Last: <input type="text" name="Last"> <br> middle: <input type="text" name="middle"> <br> <input type="submit" name="Save" value="Submit"> </form> </body> </html>
Comment