Hi,
I am having some difficulty using ADOX to retreive information ABOUT a database. (Not FROM it).
I want to know how (or if) it is possible to determine whether a Column in the Columns collection of an ADOX Table object is a Key column.
I am running the following code:
Code:
for each column in tableObj.Columns
if(column.RelatedColumn = "") then
response.write(column.name & "<br/>")
end if
next
The problem is that I get an error because I am trying to access the RelatedColumn property of non-Key columns.
The online MSDN documentation is very unclear on this issue, RelatedColumn IS listed as a property of Column, but with the proviso that is only "for key columns". However the rest of the documentation indicates that Keys and Columns are entirely seperate objects with their own collections inside Table objects.
What i am trying to do is populate a drop down list with the names of all Columns that are NOT keys, but how can I determine which ones these are?
All help greatly appreciated!