Article View: borland.public.cppbuilder.database.ado
Article #4501Re: How to open an ADO dataset without getting all the records
From: Harold Howe (TeamB)
Date: Mon, 10 Dec 2001 16:19
Date: Mon, 10 Dec 2001 16:19
29 lines
2302 bytes
2302 bytes
Alfredo Santizo wrote: > > Hi: > > All the DataSet concepts arount Delphi/C++B work nicely if you are working > with small tables...but what happens when you want to work with tables that > have 500K records and up....I would like to be able to open the dataset > without executing the query in order to allow the user to immediately insert > new records....and only obtaining records based on user-defined criteria.... On strategy is to perform an empty query. Run a query that you know will quickly return a result set with no records in it. For example, if you have a table with an integer based primary key, do a select where the primary key is null. That will open up an empty dataset. Another method is to use TClientDataSet or TADODataSet. Create a dataset, and just start adding records to it. When you are down, loop through the records and perform an insert query for each one. With this strategy, you are using the datasets as an in-memory cache of pending records to insert. > What about MIDAS? Imagine that you have a banking application running on > MIDAS with 300,000 accounts...How can 100 users open simultaneously a > Provider dataset that executes this query? I think the answer is that you don't perform queries that return all 300k records to all 100 of the simultaneous users. Harold Howe [TeamB] http://www.bcbdev.com
Technical Details
Message-ID:
<3C14E0A7.6D1CB35A@bcbdev.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3c106c25$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,3e9852488c33c3ac X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-12-10 08:38:56 PST Message-ID: <3C14E0A7.6D1CB35A@bcbdev.com> Date: Mon, 10 Dec 2001 10:19:51 -0600 From: "Harold Howe (TeamB)" <hhowe@bcbdev.com> X-Mailer: Mozilla 4.03 [en] (WinNT; I) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: How to open an ADO dataset without getting all the records References: <3c106c25$1_1@dnews> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.22.227.236 X-Trace: dnews 1008000818 24.22.227.236 (10 Dec 2001 08:13:38 -0800) Lines: 29 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews