数据库

位置:IT落伍者 >> 数据库 >> 浏览文章

SQL Server数据库对象信息的获取[4]


发布日期:2024年07月04日
 
SQL Server数据库对象信息的获取[4]
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

[] [] [] []

               

上一篇:MS SQL基础教程:SQL Server 2000的新特性[3]

下一篇:SQL Server数据库对象信息的获取[3]