<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <%Response.CodePage=65001%> <%Response.Charset="utf-8"%> <!-- 设置编码很重要,否则程序会出现异常或中文乱码问题。 --> <% 'conn '准备工作 dim conn dim connstr dim path path = server.mappath("\OneFCMS_Data\OneFCMS$%#$#Data$%#2012#$11$$#7.mdb") 'response.Write(path & "<br/>") 'on error resume next connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&path set conn=server.createobject("ADODB.CONNECTION") conn.open connstr If Err Then err.Clear Set Conn = Nothing Response.Write "数据库连接出错,请检查数据库连接文件中的数据库参数设置。" Response.End End If %> <% set rs=server.createobject("adodb.recordset") 'id=Request.QueryString("id") url传参数, 表单传参数是request.form() id = 29 sql="select * from ly where id="&id rs.open sql,conn,2,3 '查询参数是: 1,1, 添加、修改参数是: 1,3 rs.delete rs.update Response.Write "<script>alert('删除成功!');window.location.href='http://wap.07zxx.com';</script>" %>