asp+access 列出.mdb文件所有数据表格
亲测可用 asp+access 列出.mdb文件所有数据表格
<%
datas = "20180608181818.asa" '数据库相对路径
set conn=Server.CreateObject("ADODB.Connection")
conn.open "DRIVER=Driver do Microsoft Access (*.mdb);UID=admin;PWD=;DBQ="&Server.MapPath(""&datas&"")
If Err Then
err.Clear
response.write "数据库连接出错,请检查连接字串(1)"&vbcrlf
response.End()
End If
'列出所有表
Const adSchemaTables = 20
set objSchema = Conn.OpenSchema(adSchemaTables)
Do While Not objSchema.EOF
if objSchema("TABLE_TYPE") = "TABLE" then
response.write "" & objSchema("TABLE_NAME") & "<br>"&vbcrlf
end if
objSchema.MoveNext
Loop
objSchema.Close
set objSchema = nothing
%>
转载自:https://blog.csdn.net/YUJIANYUE/article/details/83445698