?
Solved

CDaoRecordset SELECT TOP 100 ...

Posted on 1997-11-13
3
Medium Priority
?
505 Views
Last Modified: 2013-11-19
I works with huge database and if I trying to open big
recordset I'm interesting only in final number of records in.
for example 100. The query looks like "SELECT * TOP 100 FROM Table WHERE
..."
but from any reason it doesn't works properly and takes too much time.
What should I do to avoid it ?
0
Comment
Question by:vadimm
  • 2
3 Comments
 
LVL 2

Expert Comment

by:dhodge
ID: 1309900
The best sollution is to create the snapshot/dynaset in the normal way and read only the first 100 records.  Using the ORDER BY clause will return the records in the correct order.
0
 

Author Comment

by:vadimm
ID: 1309901
The problem is that engine search for all records and shows
the 100. And I want that the engine will stop searching after
first 100 found records.
All fields in the query are undexed.
0
 
LVL 2

Accepted Solution

by:
dhodge earned 100 total points
ID: 1309902
If you are using DAO the engine gets the first 100 and returns them to you, only when you step past the last record in the initial 100 does it go away and read then next 100.  In effect creating a kind of buffer.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Integration Management Part 2
Suggested Courses
Course of the Month16 days, 9 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question