熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> SQL Server >> 正文

SQL Server數據庫對象信息的獲取[3]

2022-06-13   來源: SQL Server 
        Dim oDB As SQLDMODatabase

        Set oDB = oSQLServerDatabases(cob_sqldbList(cob_sqldbListIndex))

        If oCurrentDB Is Nothing Then

            Set oCurrentDB = oDB

        Else

            If oCurrentDBName = oDBName Then

            Exit Sub

        End If

        Set oCurrentDB = Nothing

        Set oCurrentDB = oDB

    End If

    FillEmptyTableList (True)

    If cob_sqltableListCount > Then

        cob_sqltableListIndex =

        cob_sqltable_Click

    End If

    

    End Sub

    Private Sub FillEmptyTableList(bFill As Boolean)

    獲得當前數據庫中的所有非系統數據表名稱

        If bFill = True Then

            Dim oTable As SQLDMOTable

            For Each oTable In oCurrentDBTables

                If oTableSystemObject = False Then

                    判斷其不是系統數據表

                    cob_sqltableAddItem oTableName

                    把非系統數據表名稱添加到數據表信息列表框中

                End If

                Next oTable

            End If

[]  []  []  []  


From:http://tw.wingwit.com/Article/program/SQLServer/201311/22457.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.