哈哈,不用ADOX也可以!! % Dim cn ,strCnn,rstSchema set cn = server.createobject("ADODB.Connection") set strCnn = server.createobject("ADODB.Recordset") set rstSchema = server.createobject ("ADODB.Recordset") strCnn = "Provider=Microsof
哈哈,不用ADOX也可以!!
Dim cn ,strCnn,rstSchema
set cn = server.createobject("ADODB.Connection")
set strCnn = server.createobject("ADODB.Recordset")
set rstSchema = server.createobject("ADODB.Recordset")
strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;"
strCnn = strCnn & "数据源=F:/asptest/tree.MDB;"
strCnn = strCnn & "保留安全信息=假的”
cn.Open strCnn
set rstSchema=cn.openSchema(20)
rstSchema.movefirst
执行直到 rstSchema.EOF
if rstSchema("TABLE_TYPE")="TABLE"然后
response.write rstSchema("TABLE_NAME") & "
"
end if
rstSchema.movenext
循环
cn.close
'设置 rstSchema = 无
'设置 cn = 无
%>
SQL -->系统表sysobjects
访问---》用ADOX的例子:
<%
暗淡 cn ,strCnn
set cn = server.createobject("ADODB.Connection")
set strCnn = server.createobject("ADODB.Recordset")
strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;数据源=F:/asptest/tree.MDB;持久安全信息=False"
cn.Open strCnn
设置 tb = Server.CreateObject("ADOX.Table")
设置 cat = Server.CreateObject("ADOX.Catalog")
设置 cat.ActiveConnection = cn
对于 cat.Tables 中的每个 a
Response.Write a.Name & "
"
下一个
cn.close
%>