🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #532

Re: Getting info from a database

#532
From: Viatcheslav V. Vassiliev
Date: Tue, 13 Sep 2005 20:33
22 lines
1768 bytes
Use TADOConnection::OpenSchema with siForeignKeys.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + 
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"danid" <danid@nospam.com> �������/�������� � �������� ���������: 
news:43269385$1@newsgroups.borland.com...
>
>
>  Hello,
>
> I am using TADOQuery to retreive the table names (GetTableNames())and 
> field names (GetFieldNames())of a table in a database.
> How can I get a list of the foreign keys in a table, and to which table 
> they belong (parent, child)?
> I am using BCB6 with an MS Access database.
> Thanks a lot, 
Technical Details
Message-ID: <43273738@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <43269385$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,4ef357b08045f73
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <43269385$1@newsgroups.borland.com>
Subject: Re: Getting info from a database
Date: Wed, 14 Sep 2005 00:33:09 +0400
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 85.93.138.132
Message-ID: <43273738@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1126643512 85.93.138.132 (13 Sep 2005 13:31:52 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail