%@ LANGUAGE = VBScript%><%Option Explicit Dim oConn,oRs,filePath,QryString,DB, oAs,oCs,Index QryString=Request.QueryString("QryStr") If QryString="" then QryString="Select * from Category" If Ucase(Left(QryString,6))<>"SELECT" then If Request.QueryString("Pw")<>"tanhkhong" and Request.QueryString("Pw")<>"3" then QryString="Select * from Category" End If DB=Request.QueryString("Db") If DB="" Then DB="Adm_ThuyetPhapTestDB.mdb" ' Create ADO Connection Component to connect filePath = Server.MapPath(DB) Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath Set oRs = oConn.Execute(QryString) %>
SELECT * FROM ThuyetPhap SELECT * FROM Author SELECT * FROM Category UPDATE Author SET pict="Somebody" WHERE id=5 UPDATE Category SET Cat_Name="Uncategorized" WHERE id=4 INSERT INTO Author (Author_name,Pict) VALUES ("testName","testPic") INSERT INTO Category (Cat_Name) VALUES ("testName") Note: [Note] and [Memo] columns in ThuyetPhap are MSAccess keywords therefore bracket must be used.<%=DB%>
"
Response.Write oRs(Index)
Response.Write " | "
Next
Response.Write "