读取数据库问题求解
各位大侠:小弟的数据库是jsj.mdb ,要读取jsj.mdb出错 求教各位帮帮小弟
程序代码:
<html><body>
<--#include file="adovbs.inc"-->
<%
dim objconn
set objconn=server.createobject("adodb.connection")
objconnn.connectionstring "driver={microsoft access driver (*.mdb)};"&_
"data source="&server.mappath("jsj.mdb")
objconn.open
dim objrs
set objrs=server.createobject("adodb.recordset")
objrs.open"信息学科组",objconn,adopenkeyset,_
adlockoptimistic,adcmdtable
if not objrs.eof then
response.write"编号:"&objrs("编号")&"<br>"
response.write"姓名:"&objrs("姓名")&"<br>"
response.write"性别:"&objrs("性别")&"<br>"
response.write"民族:"&objrs("民族")&"<br>"
response.write"学历:"&objrs("学历")&"<br>"
response.write"专业:"&objrs("专业")&"<br>"
response.write"职称:"&objrs("职称")&"<br>"
response.write"所属年级:"&objrs("所属年级")&"<br>"
response.write"电话:"&objrs("电话")&"<br>"
else
response.write"到达数据库末尾,无法打印记录"
end if
objrs.close
set objrs=nothing
objconn.close
set objconn=nothing
%>
</body></html>
请教:
1:红色语句能不能省略 我用的是access2000(无adovbs.inc文件)
2、adovbs.inc的内容是什么,怎么编写。