php获取数据库的表的数据 SQL Server数据库对象信息的获取[4]
![php获取数据库的表的数据 SQL Server数据库对象信息的获取[4]](http://img.zhputi.com/uploads/9850/985075b80aab8a5d915d4c593a4b53f433204.jpg)
SQL Server数据库对象信息的获取[4]
End SubPrivate Sub cob_sqltable_Click()
点击 数据表信息 列表框
Dim oTable As SQLDMO Table
Set oTable = oCurrentDB Tables(cob_sqltable List(cob_sqltable ListIndex))
If oCurrentTable Is Nothing Then
Set oCurrentTable = oTable
Else
If oCurrentTable Name = oTable Name Then
Exit Sub
End If
Set oCurrentTable = Nothing
Set oCurrentTable = oTable
End If
FillEmptyColsToIndex (True)
If cob_sqlrecord ListCount > Then
cob_sqlrecord ListIndex =
End If
End Sub
Private Sub FillEmptyColsToIndex(bFill As Boolean)
获得数据表中的所有字段的信息
If bFill = True Then
Dim oCol As SQLDMO Column
Set oCol = New SQLDMO Column
For Each oCol In oCurrentTable Columns
cob_sqlrecord AddItem oCol Name & & oCol DataType
把字段名称和字段属性添加到字段信息列表框中
Next oCol
End If
End Sub
lishixinzhi/Article/program/SQLServer/201311/22458