Posted on 2002-07-28
Last Modified: 2010-05-02
i need suggestion of this ...

i using flex grid as output for my record...the problem is i have 100,000 records and having problem to load the record with long time...

how to i can make my record retrieve faster...

Question by:cyseng10

Expert Comment

ID: 7183142
i think you can put filters for your record retrieval for e.g.
if you have a table called as Invoice, then get only those invoice related records which are for the current/lastest year/month. then you can filter it based on the Customer then months & so on & so forth.

I know filling the comboboxes for filters would take time but this is a good solution in terms that always you would be having only a particular set of records always.
I liked this option & am using it in all the programs which i am making. In a way the user also gets an option of applying some basic filter or searching for a set of records.


Expert Comment

ID: 7183149
no idea how to retrieve faster if really have to list out all those records.  But, you can add 'DoEvents' statement in loop for adding records to flexGrid so that your program will not stop responding.

hope this can help you. good luck.
LVL 70

Expert Comment

by:Éric Moreau
ID: 7183373
I have never seen the need of retreiving 100,000 records into a single grid in one shot. Let the user specify some criteria to limit the number of records. You can also (if your database accepts it) use the TOP statement in your query:

SELECT TOP 150 * FROM TableA ...
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

LVL 75

Expert Comment

by:Anthony Perkins
ID: 7183628
I suppose it is kind of pointless to remind you to maintain your many open questions:

crsytal report connection Date: 06/16/2002 06:38AM PST
Trigger and Network Linked Date: 07/02/2002 07:43PM PST
SQL Command Date: 06/24/2001 08:51PM PST
Register crystl32.ocx Date: 06/27/2002 09:58PM PST
Text compare Date: 05/13/2002 02:14AM PST
Application Control Date: 01/17/2002 06:51PM PST
Sort Data Date: 08/06/2001 02:10AM PST


Expert Comment

ID: 7184423
If you sure that the user may want to see all the 100,000 records, then maybe you can try to use the the recordSet's PageSize,AbsolutePage,PageCount to retreive your set of records.

This will work similarly to the search in differnet web site, eg: as in google, meaning you can here retreive 100(or whatever the pageSize you have mentioned) records at a time, and then at the click of a command button retreive the next 100 records and so on.

See the explaination of these in the msdn library.

Hope this gives you some idea!

LVL 18

Accepted Solution

mdougan earned 50 total points
ID: 7185215
If you set your recordset to be a "server-side" cursor, (cursorlocation = adUseServer), then you can fill only the first hundred or so items into the grid from the recordset pretty quickly.  As the user scrolls down, you can check in either the rowcolchange event or some other event to see what the toprow of the grid is.  If you are near to the total number of rows for the grid, you can then populate another 100 rows into the grid from the recordset.

I'm not crazy about this type of design, and it supposes that the user is going to be looking at the 100,000 rows more or less in order, and not wanting to jump down to close to the bottom of the recordset right away, but, it does work.  Personally, I agree with emoreau, rethink your design and ask the user to set a smaller scope of the records to be displayed.

Off-topic to Anthony,
Anthony, it's really great that you are helping to ensure that all old questions get closed out and that points are awarded to the experts.  This is what keeps this whole site working!  If people ask questions and then never award the points, then the experts have less motivation to spend their time answering questions, and everyone loses.  

So, if cyseng10 appreciates the help that they are getting, then they should do as you recommend and go back and close out their questions.  If they don't feel that the questions have been sufficiently answered, then they can post a zero point question to the Community support area with a link to their question asking that the question be closed and their points refunded.

But the reason for this off-topic comment is that I've noticed your reminders have been getting more and more negative  "I suppose it's pointless..."

I think you have two types of people with lots of open questions.  Those who are not really aware of the protocol of the site, where you actively maintain your open questions until you find a solution or else you close out the question.  These people just need to be politely reminded to clean-up their questions.  And then there are those who just don't care or just don't get it.  And, in my opinion, EE should enforce a policy that if you have a question that is open longer than some time period (say 1 month) or if you have some number of open questions (say 5), that you not be able to ask any more questions until you clean them up.  

But in either case, try to stay positive!

LVL 75

Expert Comment

by:Anthony Perkins
ID: 7185416

Thanks for the vote of confidence.

>> But in either case, try to stay positive!<<
You make a good point.

LVL 18

Expert Comment

ID: 7186188
  Lets see if cyseng10 gets the hint ;)

Expert Comment

ID: 7187926
     Grade B Says cyseng10 votes with U

     >> But in either case, try to stay positive!<<
    for me means thanks Antony to help us to know home to help

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

831 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