<html>
<body>
<%
dim conn,connstr,db
db="md.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
conn.Open connstr
'创建数据库链接数据库对象CONN
%>
<%
Set rs =Server.CreateObject("ADODB.Recordset")
rs.Open "fenlie",conn,3,3
rs("mig")="1000000000"
rs.movenext
rs("mig")="1000000000"
rs.Update
'修改表中内容,rs表格对象。
response.write("Hello World!")
%>
<br>
<%
SQL="select * from fenlie"
SET CustomerList=conn.EXECUTE(SQL)
DO WHILE NOT CustomerList.EOF
response.write(CustomerList("lianjie"))
response.write(CustomerList("mig"))
response.write(CustomerList("text"))
CustomerList.movenext
loop
'查询表中所以字段
%>
<%
SQL="insert into fenlie(mig)values('aaaaaaa')"
conn.execute(SQL)
'添加记录
%>
<%
SQL="SELECT * FROM fenlie WHERE id=1"
CustomerList=conn.execute(SQL)
response.write(CustomerList("lianjie"))
'查询
%>
<%
SQL="delete * from fenlie where mig='aaaaaaa'"
conn.execute(SQL)
'删除全部符合条件的记录
%>
</body>
</html>