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

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

2022-06-13   來源: SQL Server 
        End Sub

    Private Sub cob_sqltable_Click()

        點擊數據表信息 列表框

        

        Dim oTable As SQLDMOTable

        Set oTable = oCurrentDBTables(cob_sqltableList(cob_sqltableListIndex))

        If oCurrentTable Is Nothing Then

            Set oCurrentTable = oTable

        Else

            If oCurrentTableName = oTableName Then

            Exit Sub

        End If

        Set oCurrentTable = Nothing

        Set oCurrentTable = oTable

    End If

    FillEmptyColsToIndex (True)

    If cob_sqlrecordListCount > Then

        cob_sqlrecordListIndex =

    End If

    

    End Sub

    Private Sub FillEmptyColsToIndex(bFill As Boolean)

        獲得數據表中的所有字段的信息

        If bFill = True Then

            Dim oCol As SQLDMOColumn

            Set oCol = New SQLDMOColumn

            For Each oCol In oCurrentTableColumns

            cob_sqlrecordAddItem oColName & & oColDataType

            把字段名稱和字段屬性添加到字段信息列表框中

            Next oCol

        End If

    End Sub

[]  []  []  []  


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