Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Data Relationships - Accessing them


Message #1 by "Carl Schneider" <cschneider@i...> on Sat, 29 Sep 2001 19:41:34
Hello all,



If anybody has any light to shed on this please do.



I think my question is in two parts.



ONE:



How do I retrieve any relationships set on a given field in a DataColumn 

in a Datatable in a Dataset.



Example:



  I'm looping through the data columns and want to check for contraints

(Relationships?) such as Primary and foreign keys. Then I want to perform 

logic based on the type of Constraint it is.



TWO:



How can I retrieve the constraint information from SQL. Either to manually 

set the relationships in the dataset or carry them over to be set 

automatically.





Example: 



   To get to the point in Example 1 of looping through the Relationships 

I'm setting them in my code. I would ideally like this to be set when 

filling my data table. If I can't do this then I need to access the 

information to I can set the relationships in my code using a generic 

routine.



Again anything would help, links to subject matter, code snippits, or just 

ideas.



Carl Schneider

  Return to Index