读取ACCESS数据库表名实例
类别: ASP教程
<%
strConn="DBQ="+server.mappath("kendylan.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set objConn=server.createobject("Adodb.connection")
objConn.open strConn
set rsSchema=objConn.openSchema(20)
rsSchema.movefirst
Do Until rsSchema.EOF
if rsSchema("TABLE_TYPE")="TABLE" then
response.write rsSchema("TABLE_NAME") & "<br>"
end if
rsSchema.movenext
Loop
set objConn=nothing
%>
strConn="DBQ="+server.mappath("kendylan.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set objConn=server.createobject("Adodb.connection")
objConn.open strConn
set rsSchema=objConn.openSchema(20)
rsSchema.movefirst
Do Until rsSchema.EOF
if rsSchema("TABLE_TYPE")="TABLE" then
response.write rsSchema("TABLE_NAME") & "<br>"
end if
rsSchema.movenext
Loop
set objConn=nothing
%>
- 上一篇: 随机产生N位由数字和字母组成的密码
- 下一篇: 使用条件语句
-= 资 源 教 程 =-
文 章 搜 索