le.Name = oTable.Name Then
Exit Sub
End If
Set oCurrentTable = Nothing
Set oCurrentTable = oTable
End If
FillEmptyColsToIndex (True)
If cob_sqlrecord.ListCount > 0 Then
cob_sqlrecord.ListIndex = 0
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