连接:
<%
db="myweb.mdb" '数据库名字
Set Conn = Server.CreateObject("ADODB.Connection")
Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
Conn.Open Connstr
%>
添加:
<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
rs.open"select * from new",conn,2,2
type2=request.Form("type1") 接受数据
caption2=request.Form("caption")
content2=request.Form("content")
time2= request.Form("time")
rs.addnew
rs("type1")=type2 往数据库添加数据
rs("caption")=caption2
rs("content")=content2
rs("time1")=time2
rs.update
response.Redirect("admin_addnew.asp")
%>
删除就是delete了