PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Re: Getting ParentRelations for a DataTable using FillSchema
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Re: Getting ParentRelations for a DataTable using FillSchema
![]() |
Re: Getting ParentRelations for a DataTable using FillSchema |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
If your using a SQL-92 compliant back end, you can use the Information
Schemas. If you are using SQL Server (or Oracle, and probably others), let me know if you need more information on this approach. Kathleen "Roy Osherove" <fireride@netvision.net.il> wrote in message news:bdk76c$oqs$1@news2.netvision.net.il... > Hi all. > I'm facing the following problem: > > Given a DataTable, I need to know all the Other DataTables that have a > Relation to this table. Specifically, I want to know all the relations in > which this table is a "Details" table (i.e. has a foreign key constraint). > > I've tried using the DataAdapter.FillSchema method, but no luck. > I've also tries setting the DataAdapter.MissingSchemaAction to AddWithKey, > but still no luck. > I've made sure that the table actually has a foreign key in the DB(I'm using > Northwind SQL server). > > The only way that works, is by using a completely different feature: > Connection.GetOleDBSchemaTable(), but It seems to me that this shouldn't be > possible using the DataAdapter as well. > > Has anyone used this method successfully? > > |
|
|
|
#2 |
|
Guest
Posts: n/a
|
I'm not sure i understand. Could you please elaborate? I'm using SQL server 2000. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

