幫你找到了一份文獻
asp access 判斷表是否存在
使用ConnectionObject.OpenSchema(20)可以得到RecordSet對象,RecordSet對象包含當前數據庫中所有數據表的信息,要判斷某名稱的表是否存在,可以用循環匹配,如:
Dim Rs
Set Rs = Conn.OpenSchema(20)
Do While Not Rs.EOF
If Rs("Table_Name") = "TheTableName" Then
'找到表的操作。。
Else
'找不到表。。
End If
Rs.Close
Set Rs = Nothing
其中Conn.OpenSchema(20)中的參數20,是常量adSchemaTables的值,返回視圖的類型是表和視圖。MSDN原文:
Returns the tables (including views) defined in the catalog that are accessible to a given user.
還有別的許多其它的類型,有興趣的朋友可以參考一下MSDN。
參考文獻:
判斷一個access數據庫中某個表是否存在的方法 http://webdevelop.chinahtml.com/1/2006/asp-11407388513659.shtml