<%@ LANGUAGE = VBScript%><%Option Explicit Dim SourceDir,fso,Indent,nl,SrcDrLen,tmp,Title,oConn,oRs,filePath,RecID,UniqueID,CatId Dim id,AuthorId,nAuthorId,Location,Date,Source,Note,qryStr,DatePosted,sStr,nCatId,Memo nl=vbCrLf Indent=0 Const ForReading = 1 SourceDir=Server.MapPath("./") Set fso = CreateObject("Scripting.FileSystemObject") Set SourceDir = fso.GetFolder(SourceDir) SrcDrLen=Len(SourceDir.Path)+2 ' Create ADO Connection Component to connect filePath = Server.MapPath("Adm_ThuyetPhap.mdb") Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath %> Record Updated <% UniqueID=Request.QueryString("ID") title=Request.QueryString("Title") AuthorId=CInt(Request.QueryString("author")) CatId=CInt(Request.QueryString("category")) Location=Request.QueryString("Location") Date=Request.QueryString("Date") Source=Request.QueryString("Source") Note=Request.QueryString("Note") DatePosted=Request.QueryString("DatePosted") Memo=Request.QueryString("Memo") ' for debugging 'sStr = "Update ThuyetPhap0 Set title=""" & title & """,AuthorId=" & AuthorId & ",Location=""" & Location & """,CatId=" & CatId & ",[Date]=""" & Date & """,Source=""" & Source & """,[Note]=""" & Note & """,DatePosted=""" & DatePosted & """,[Memo]=""" & Memo & """ Where UniqueID=""" & UniqueID & """;" 'Response.write(sStr) ' end for debugging Set oRs = oConn.Execute("Update ThuyetPhap0 Set title=""" & title & """,AuthorId=" & AuthorId & ",Location=""" & Location & """,CatId=" & CatId & ",[Date]=""" & Date & """,Source=""" & Source & """,[Note]=""" & Note & """,DatePosted=""" & DatePosted & """,[Memo]=""" & Memo & """ Where UniqueID=""" & UniqueID & """;") oConn.Close Response.Redirect "Adm_Listmaintenance.asp" %>