Article View: borland.public.cppbuilder.database.ado
Article #2169Re: TADOTable Out of Order
From: Robert Emmons
Date: Fri, 31 Oct 2003 17:07
Date: Fri, 31 Oct 2003 17:07
31 lines
2038 bytes
2038 bytes
On Fri, 31 Oct 2003 10:30:34 -0500, Robert Emmons <remmons@aurigen.com> wrote: >I have a TADOTable (Tbl) in a Jet database with the following fields: > >ID1 >Date >ID2 >Data > >The PrimaryKey is ID1, Date, ID2. I display the table in a TDBGrid, >and set: > >DataSource->DataSet->Tbl->Active = true >DataSource->DataSet->Tbl->IndexName = PrimaryKey > >Nevertheless, the table appears in order by ID1, ID2, Date instead of >by ID1, Date, ID2. If I display the table with Microsoft Access, it >appears properly in PrimaryKey order. > >How can I get the table to appear in proper order in the TDBGrid? After further testing I have determined that the TDBGrid simply does not display the table in order by any index. I defined an an index on ID1, another on ID2, another on Date. The indexes appear as selections in design mode, but order of the records in the TDBGrid does not change regardless of which index I select. The TDBGrid seems to always show the table in the order that the records are actually entered in the table. How can I get the table to appear in proper order in the TDBGrid?
Technical Details
Message-ID:
<im55qv461qi4fmugedg09ir3srv25aj71m@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<1vv4qvcl4irnt8ln5t1p31ge0cshk96s6s@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,b4ab9cb102f7ab18 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-10-31 09:10:15 PST From: Robert Emmons <remmons@aurigen.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: TADOTable Out of Order Date: Fri, 31 Oct 2003 12:07:44 -0500 Message-ID: <im55qv461qi4fmugedg09ir3srv25aj71m@4ax.com> References: <1vv4qvcl4irnt8ln5t1p31ge0cshk96s6s@4ax.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 68.193.14.50 X-Trace: newsgroups.borland.com 1067620052 68.193.14.50 (31 Oct 2003 09:07:32 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail