Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > table relationships

Reply
Thread Tools

table relationships

 
 
et
Guest
Posts: n/a
 
      12-28-2004
How do I programmtically get the relationships of a table??

I can get the list of columns:
dtFields = conn.GetOleDbSchemaTable(OleDbSchemaGuid., New Object() {Nothing,
Nothing, strTableName, Nothing"})

, but when I change it to Foreign_Keys, no data is returned.

dtFields = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Foreign_K eys, New
Object() {Nothing, Nothing, strTableName, Nothing})


 
Reply With Quote
 
 
 
 
Jason
Guest
Posts: n/a
 
      12-28-2004
ET,
What database are you using? If it's SQL, try accessing the system
tables for getting at this information.

http://www.microsoft.com/sql/techinf.../systables.asp

Jason

et wrote:
> How do I programmtically get the relationships of a table??
>
> I can get the list of columns:
> dtFields = conn.GetOleDbSchemaTable(OleDbSchemaGuid., New Object()

{Nothing,
> Nothing, strTableName, Nothing"})
>
> , but when I change it to Foreign_Keys, no data is returned.
>
> dtFields = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Foreign_K eys, New
> Object() {Nothing, Nothing, strTableName, Nothing})


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
table relationships John ASP General 2 03-10-2005 05:16 AM
accessing typed dataset relationships? Darren Clark ASP .Net 3 06-17-2004 10:56 PM
2 tables and 2 relationships in a datagrid =?Utf-8?B?T3plcg==?= ASP .Net 1 06-14-2004 12:23 AM
XmlDataDocument error with DataSet relationships set Steve ASP .Net 0 02-29-2004 04:07 AM
getting MS Access table relationships with pythonWin? cvchen Python 1 10-29-2003 04:30 AM



Advertisments