How to dynamically create DataRelations using GetSchema? -
12-23-2007
, 12:34 AM
I'm working on some code that is to generate a complete DataSet given
a database connection (for now only Sql). I use GetSchema on the
connection to retrieve table and column information. Now I'm looking
for a way to create the DataRelations in the DataSet but I can find no
easy way to get the information I need for this from GetSchema (unless
I'm missing something).
There is a ForeignKeys collection that returns information about FK
constraints but there is no column information in there.
Is there a way to create DataRelations from collection information
returned from GetSchema?
Thanx,
--Marc |