Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have seen how to set the properties of a column using ADOX, eg,
VB
CascadeKey.DeleteRule = ADOX.RuleEnum.adRICascade


What I need now is how to read the same property values of a key column, ie, the opposite code. I was thinking something like this would work but to my disappointment it didnt:

VB
For Each col In Adox.Tables(tbl).Columns
 'then I successfully filtered the foreign key columns
 'I get the correct field name and type
 Dim cName as string = col.Name
 'but the rest of the code below failed!
 Dim DelRule As String = col.Properties("DeleteRule").Value
 Dim UpdateRule As String = col.Properties("UpdateRule").Value
 Dim RefCol As String = col.RelatedColumn
 Dim RefTable As String = col.Properties("DeleteRule").Value
 Dim RelationName As String = col.Properties("FK_Name").Value
Next


How would I do this?

Thanks.
Posted
Updated 26-Nov-12 17:54pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900