-
Hi!
Does anyone know how do I get the tabledefs number I have in a database?
When I used the DAO, a wrote:
...
For i = 1 To db.tabledefs.Count - 1
debug.print db.tabledefs(i).Name
Next
...
How do I do the same thing using the ADO Connection?
Or, if possible, using another ADO object?
Thanks a lot!!!
[]'s
Marcelo Piazza
-
try somthing like this and don't forget to add a reference to ADOX (Microsoft ADO Ext. 2.1 for DDL and Security). you will need VB6 SP3.
***********************************************************
Dim x As New ADOX.Catalog
Dim t As New ADOX.Table
Dim c As New ADOX.Column
' Be sure to create your own Connection-object
Set x.ActiveConnection = GetConnection()
For Each t in x.Tables
Debug.Print t.Name
For Each c In t.Columns
Debug.Print c.Name & ", " & _
c.Type & ", " & _
c.DefinedSize & ", " & _
c.Properties("Default")
Next
Next
good luck
-
Thanks a lot, Sascha! It worked fine!
[]'s
Marcelo Piazza