MDB内に指定したテーブルが存在するか
by achi on Dec.15, 2008, under VB.NETテクニック
‘MDB内に指定したテーブルが存在するか
‘Table存在確認関数
Private Function isExistsTable(ByVal strTableName As String)
Dim objCat, objTable
objCat = CreateObject(”ADOX.Catalog”)
objCat.ActiveConnection = CONN
isExistsTable = False
For Each objTable In objCat.Tables
If objTable.Type = “TABLE” Then
If objTable.Name = strTableName Then
isExistsTable = True
Exit For
End If
End If
Next
objCat = Nothing
End Function
Leave a Reply
*----* Note : *----*
Please write only in Japanese or English.
If you will post any other languages, we'll mark them as spam.
And also if a linked URI in your comments, I do not approve.
*----*----*
You must be logged in to post a comment.
6月 5th, 2010 on 3:58 pm
Hi
Very nice and intrestingss story.