I have successfully established the connection to a database as follows
Dim conn As New ADODB.Connection
conn.Open "driver={Microsoft ODBC for Oracle};" & _
"server=
js;" & _
"uid=hsonsche;pwd=hsons"
Set Cat = New ADOX.Catalog
Cat.ActiveConnection = conn
I have also succeeded in listing the tables contained in the database
in a combobox as follows:
Tbl = 1
Do While Tbl < Cat.Tables.Count
If Trim$(UCase(Cat.Tables(Tbl).Type)) = "TABLE" Or Trim$(UCase(Cat.Tables(Tbl).Type)) = "VIEW" Then
If Mid(Cat.Tables(Tbl).Name, 3, 1) <> "$" Then
Downloader.Combo4Tables.AddItem Cat.Tables(Tbl).Name
End If
End If
Tbl = Tbl + 1
Loop
Now the problem is that I need the combo4Tables should include Name_of_Table & Tables(Tbl).NumberofRecords
what is the syntax?
I would not like to use a recordset to first load the recs in it and then count them, is there a short cut way of doing this?