hi everyone. can someone please tell me how to get the datatype of a Column of a Table in ADOX?
I was able to successfully get all the the tables and fields of my MSAccess database but i don't know how to get the datatype of each fields.
i have this code to get all the fields for a given table:
the properties collection has only the following data:Code:Private Sub lvwTables_ItemClick(ByVal Item As MSComctlLib.ListItem) Dim oCol As ADOX.Column Dim x As Integer Dim iIndex As Integer Dim iList As ListItem Dim prop As ADOX.Property iIndex = Val(Item.SubItems(3)) lvwFields.ListItems.Clear For x = 0 To m_Cat.Tables(iIndex).Columns.Count - 1 Set oCol = m_Cat.Tables(iIndex).Columns(x) Set iList = lvwFields.ListItems.Add(, , oCol.Name) 'testing For Each prop In oCol.Properties Debug.Print prop.Name & " = " & prop.Value Next Next End Sub
thanks.HTML Code:Autoincrement = False Default = Description = Nullable = True Fixed Length = False Seed = 1 Increment = 1 Jet OLEDB:Column Validation Text = Jet OLEDB:Column Validation Rule = Jet OLEDB:IISAM Not Last Column = False Jet OLEDB:AutoGenerate = False Jet OLEDB:One BLOB per Page = False Jet OLEDB:Compressed UNICODE Strings = True Jet OLEDB:Allow Zero Length = True Jet OLEDB:Hyperlink = False
-guyjasper


Reply With Quote
