Solved

CDaoRecordset SELECT TOP 100 ...

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 29
Windows Drag & Drop Location 2 94
iSeries DB2 Query 2 91
scoreUp challenge 14 57
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now