当前位置:编程学习 > asp >>

如何读取Access数据库的表名?

答案: <%
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
%>

上一个:如何读取Windows的信息文件?
下一个:如何定时执行约定的页面?

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,