Hi all,
I was wondering how can I loop through all the database in a
particular server using ADODB into a combobox? Below is the code I
tried using but didnt work, any hints/solutions for this anyone??
Thanks,
Henry
Dim Cnxn As ADODB.Connectio n
Dim rstSchema As ADODB.Recordset
Dim strCnxn As String
Cnxn = New ADODB.Connectio n
'Sybase ASE ODBC Driver Connection string - uses DSN
'strCnxn = "DSN=ase4141;UI D=" & ;PWD=;"
strCnxn = "DSN=" & Me.cbxDataSourc e.Text & ";UID=" &
Me.tbxLogin.Tex t & ";PWD=" & Me.tbxPassword. Text
Cnxn.Open(strCn xn)
rstSchema = Cnxn.OpenSchema (ADODB.SchemaEn um.adSchemaSche mata)
Do Until rstSchema.EOF
Debug.WriteLine (rstSchema)
rstSchema.MoveN ext()
Loop
' clean up
rstSchema.Close ()
Cnxn.Close()
rstSchema = Nothing
Cnxn = Nothing
I was wondering how can I loop through all the database in a
particular server using ADODB into a combobox? Below is the code I
tried using but didnt work, any hints/solutions for this anyone??
Thanks,
Henry
Dim Cnxn As ADODB.Connectio n
Dim rstSchema As ADODB.Recordset
Dim strCnxn As String
Cnxn = New ADODB.Connectio n
'Sybase ASE ODBC Driver Connection string - uses DSN
'strCnxn = "DSN=ase4141;UI D=" & ;PWD=;"
strCnxn = "DSN=" & Me.cbxDataSourc e.Text & ";UID=" &
Me.tbxLogin.Tex t & ";PWD=" & Me.tbxPassword. Text
Cnxn.Open(strCn xn)
rstSchema = Cnxn.OpenSchema (ADODB.SchemaEn um.adSchemaSche mata)
Do Until rstSchema.EOF
Debug.WriteLine (rstSchema)
rstSchema.MoveN ext()
Loop
' clean up
rstSchema.Close ()
Cnxn.Close()
rstSchema = Nothing
Cnxn = Nothing
Comment