Solved

CDaoRecordset SELECT TOP 100 ...

Posted on 1997-11-13
3
480 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 50 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASCII Non-Printable characters/codes and their HTML equivalents 6 132
ffmpeg - "rtsp://...... Operation not permitted" 4 86
lucky13 challenge 11 155
Line meaning 9 88
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

830 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