Take it easy!

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

1 comment for this entry:
  1. JassiMostru

    Hi
    Very nice and intrestingss story.

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.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...