Article View: borland.public.vdbase.data.sql
Article #256Re: Linking Tables
From: Geoff S. Wass
Date: Sat, 19 Dec 1998 00:00
Date: Sat, 19 Dec 1998 00:00
34 lines
1956 bytes
1956 bytes
Bradner/Klein, The child table needs to be indexed on a field that corresponds to the parent field that is linked to it. The parent, however, does not have to have the same index. If you wish to display the child rows (with the risk of them being readonly), you can add the "ORDER BY" clause to the SQL statement for the child QUERY. For example, you could replace the "SELECT * FROM Invoices" with "SELECT * FROM Invoices ORDER BY InvoiceDate DESCENDING" to see the most recent Invoice first. If you don't want to have things "readonly", you could make a different index in the child table that combines the field used for connecting the tables and the field on which you wish to order the display of the child records. Thus, you could have a child table index of Invoice + SalesRep so that you can display invoices handled by the same sales representative together, but the linking can be done on just the Invoice field of the parent and this index. Yes, if you change the SQL property you must reconnect everything as you state. -- Geoff Wass Kuala Lumpur, Malaysia == In news groups use a reply (not e-mail) so all can help and learn! == == Report Inprise/Borland bugs... == http://www.inprise.com/devsupport/bugs/bug_reports.html == dBASE Archives http://forumsearch.borland.com:88/ == or http://www.dejanews.com == Alan Katz's Visual dBASE Magazine http://www.ksoftinc.com/vdb/
Technical Details
Message-ID:
<367B3202.6C3D0BE2@ibm.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<75f82q$2jl10@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,1c2859de4a90efed X-Google-Attributes: gidff5a1,public From: "Geoff S. Wass" <gswass@ibm.net> Subject: Re: Linking Tables Date: 1998/12/19 Message-ID: <367B3202.6C3D0BE2@ibm.net> X-Deja-AN: 423845744 Content-Transfer-Encoding: 7bit References: <75f82q$2jl10@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Noordindarus Consultancy Sdn. Bhd. Mime-Version: 1.0 Newsgroups: borland.public.vdbase.data.sql