<%Dim connstrconnstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Stu.mdb")
Set bb = Server.CreateObject("ADODB.Connection")
bb.Open connstr%>
<html>
<head>
<meta http-equiv="content-Language" content="zh-cn" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Asp+Access读取数据库</title>
</head>
<body>
<%Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "select * from StuInfo",bb
if rs.eof and rs.bof then
response.Write "数据库中没有数据"
response.End()
end if
response.Write rs("Name")response.Write rs("Sex")
%>
</body>
</html>
asp连接access数据例子
最新推荐文章于 2023-05-01 01:13:20 发布