<% dim adoCn dim adoRs set adoCn = Server.CreateObject("ADODB.Connection") adoCn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("database/data.mdb") set adoRs = Server.CreateObject("ADODB.Recordset") if Not IsEmpty(Request.Form("txtContent")) then 'Update content sTitle = Replace(Request.Form("inpTitle"),"'","''") sContent = Replace(Request.Form("txtContent"),"'","''") adoCn.Execute "Update content set content='" & sContent & "', title='" & sTitle & "' where id=1" end if 'Load content set adoRs = adoCn.Execute("Select * From Content where id=1") If not adoRs.EOF then sTitle = adoRs("title") sContent = adoRs("content") End If adoRs.Close set adoRs = nothing adoCn.Close set adoCn = nothing %>

Updating a Database (ASP example) - Back

Title: