Public Sub GetAllDSNs(ByRef cmb As ComboBox)
' Fill a listbox control with the list of all available DSNs
Dim ODBCTool As New ODBCTool.Dsn
Dim Dsn() As String, i As Long
If ODBCTool.GetDataSourceList(Dsn()) Then
' a True return value means success
cmb.Clear
For i = 0 To UBound(Dsn)
cmb.AddItem Dsn(i)
Next
Else
' a False value means error
MsgBox "Unable to read ODBC driver list", vbExclamation
End If
End Sub
'Это вызов
mODBC.GetAllDSNs Me.cmbDSN
Сейчас этот форум просматривают: Google-бот и гости: 2