Solved

CDaoRecordset SELECT TOP 100 ...

Posted on 1997-11-13
3
482 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

752 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