You should be able to get the Description for a field in ADOX with:
Column.Properties("Description")
You may find that Access 2000 and later do not maintain the CreateDate etc.
I'm confused. As I previously explained, I can get the field (column)
commnents using ADOX. It is the table comments I'm having trouble with. I
know my variable oTable is good because I'm gettting reasonable values for
the creation date and modification date.
Siegfried
Here is my code. Neither of the loops execute.
Public oTable As ADOX.Table
.....
Dim ii As Integer
Dim oProp As ADOX.Property
' This never executes
For Each oProp In oTable.Properties
MsgBox("name=" & oProp.Name.ToString() & " value=" &
oProp.Value & " type=" & oProp.Type.ToString & " attr=" &
oProp.Attributes.ToString())
Next oProp
' This never executes either!
For ii = 0 To oTable.Properties.Count - 1
Dim xmlProp As XmlElement =
xmlTag.OwnerDocument.CreateElement("property")
xmlTag.AppendChild(xmlProp)
Dim xmlAttr4 As XmlAttribute =
xmlTag.OwnerDocument.CreateAttribute("name")
xmlAttr4.Value = oTable.Properties(ii).Name.ToString()
xmlProp.Attributes.Append(xmlAttr4)
Dim tnPropN As TreeNode =
tnProperties.Nodes.Add(oTable.Properties(ii).Name.ToString())
Dim tnAttr As TreeNode = tnPropN.Nodes.Add("Attributes")
tnAttr.Nodes.Add(oTable.Properties(ii).Attributes.ToString())
Dim xmlAttr5 As XmlAttribute =
xmlTag.OwnerDocument.CreateAttribute("attributes")
xmlAttr5.Value = oTable.Properties(ii).Attributes.ToString()
xmlProp.Attributes.Append(xmlAttr5)
Try
Dim s As String = oTable.Properties(ii).Value.ToString()
tnPropN.Nodes.Add("Value").Nodes.Add(s)
Dim xmlAttr6 As XmlAttribute =
xmlTag.OwnerDocument.CreateAttribute("value")
xmlAttr6.Value = s
xmlProp.Attributes.Append(xmlAttr6)
Catch : End Try
Dim tnType As TreeNode = tnPropN.Nodes.Add("Type")
tnType.Nodes.Add(oTable.Properties(ii).Type.ToString())
Dim xmlAttr7 As XmlAttribute =
xmlTag.OwnerDocument.CreateAttribute("type")
xmlAttr7.Value = oTable.Properties(ii).Type.ToString()
xmlProp.Attributes.Append(xmlAttr7)
Next