Sad Der
accessd666 at yahoo.com
Mon Feb 28 03:22:19 CST 2005
Hi group,
I need to retrieve the following info from a table:
tablename, columnname, propertyname, propertyvalue
Eg:
MyTable, MyColumn, FieldSize, Double
I've got this code:
Sub ListTableInfo()
'Create catalog object
Dim Catalog As New ADOX.Catalog
Set Catalog.ActiveConnection =
CurrentProject.Connection
'List tables And columns
Dim Table As ADOX.Table
Dim Column As ADOX.Column
Dim Prop As ADOX.Property
For Each Table In Catalog.Tables
If Left(Table.Name, 4) <> "MSYS" Then
For Each Column In Table.Columns
Debug.Print Table.Name & ", " &
Column.Name
For Each Prop In Column.Properties
Debug.Print "Prop.Attributes: " &
Prop.Attributes
Debug.Print "Prop.Name: " & Prop.Name
Debug.Print "Prop.Type: " & Prop.Type
Debug.Print "Prop.Value: " &
Prop.Value
Next Prop
Next
End If
Next
End Sub
But there's something wrong with the properties. It
returns the following "info":
Mytable, MyColumn
Prop.Attributes: 1537
Prop.Name: Autoincrement
Prop.Type: 11
Prop.Value: False
BTW, I'm using ADOX...that's no requirement.
Does anybody know what's wrong?
TIA
Sander
PS: i've posted this one twice...somehow the first one
didn't show up on the list!?!??!?!
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo