Article View: borland.public.cppbuilder.database.ado
Article #5295RE: Any ideas of how to do one query that include more of one ADOTable? Can you help me...
From: Jaime Alvarez
Date: Fri, 15 Jun 2001 02:56
Date: Fri, 15 Jun 2001 02:56
46 lines
2581 bytes
2581 bytes
Hi Mark, I will test today.. Very thank�s Mark! Mark Cashman <mcashman@temporaldoorway.com> escribi� en el mensaje de noticias 3B297036.68B7A5B3@temporaldoorway.com... > Hi, Jaime! > > You can either... > > 1) Use a lookup field on one TADOTable that refers to fields in another > TADOTable or > 2) Use a TADOQuery with a SELECT command that joins the two underlying > database tables. > > To create a lookup field, double-click on the TADOTable, right button on > the fields editor window that appears, pick "New Field" and then create > the lookup field; set the field in the current table which is to be used > as the key to the other table, set the other table, and set which field > in the other table is the key, and which field in the other table is to > be returned. > > To create a SQL SELECT command to join the two tables, follow the > pattern... > > SELECT * FROM sometable,othertable WHERE sometable.otherID = > othertable.ID > > Note that the table names in this command are not the names of two > TADOTable components, but are the names of underlying database tables. > > I hope this helps. > > ------ > Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at > http://www.temporaldoorway.com > - Original digital art, writing, music and more - > C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring > (Join us!) > http://www.temporaldoorway.com/programming/index.htm > ------ > >
Technical Details
Message-ID:
<3b2a218c_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b28e891$1_1@dnews> <3B297036.68B7A5B3@temporaldoorway.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,4a7721c2ca7357b3 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-06-15 08:12:22 PST Reply-To: "Jaime Alvarez" <jalvarez@wjreddin.com> From: "Jaime Alvarez" <jalvarez@wjreddin.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3b28e891$1_1@dnews> <3B297036.68B7A5B3@temporaldoorway.com> Subject: RE: Any ideas of how to do one query that include more of one ADOTable? Can you help me... Date: Thu, 14 Jun 2001 21:56:54 -0500 Lines: 48 Organization: Consultores en Efectividad Gerencial S.A. de C.V. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 NNTP-Posting-Host: 200.39.36.169 Message-ID: <3b2a218c_2@dnews> X-Trace: dnews 992616844 200.39.36.169 (15 Jun 2001 07:54:04 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews