🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Information on accessing the active records and Sorting a DBGrid

#2237
From: dcent
Date: Tue, 09 Sep 2003 07:36
16 lines
1745 bytes
Jim,

This is off the top of my head, so bear with me.

I assume that you have Access? Does the table that you are displaying in 
the DBGrid have any indices? You can set the Index property of the 
TADOTable to get the sorting. You could also use a TADOQuery with a 
SELECT * FROM sometable ORDERED BY FieldName statement and connect it to 
a TDataSource. I don't see a need for a hidden DBGrid.

As for selecting filenames: look at the TOpenDialog component. With it 
you can select one or more files from any given directory, then add each 
file into your db using a TADOTable->Append()/Post() operation.

Good Luck
dcent
Technical Details
Message-ID: <3F5D8312.1080703@NetScape.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f5cf14c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,709487ce5bda33f2
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-09-09 01:21:22 PST
Message-ID: <3F5D8312.1080703@NetScape.net>
Date: Tue, 09 Sep 2003 02:36:50 -0500
From: dcent <DcentJ8@NetScape.net>
Reply-To:  DcentJ8@NetScape.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: Information on accessing the active records and Sorting a DBGrid
References: <3f5cf14c$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 65.80.162.249
X-Trace: newsgroups.borland.com 1063093011 65.80.162.249 (9 Sep 2003 00:36:51 -0700)
Lines: 17
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail