Solved

Suggestion....

Posted on 2002-07-28
9
240 Views
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...



0
Comment
Question by:cyseng10
9 Comments
 
LVL 5

Expert Comment

by:jayeshshah
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.

0
 
LVL 2

Expert Comment

by:yongyih
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.
0
 
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 ...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
http://www.experts-exchange.com/crystal/Q_20312379.html
Trigger and Network Linked Date: 07/02/2002 07:43PM PST  
http://www.experts-exchange.com/mssql/Q_20318925.html
SQL Command Date: 06/24/2001 08:51PM PST  
http://www.experts-exchange.com/mssql/Q_20140923.html
Register crystl32.ocx Date: 06/27/2002 09:58PM PST  
http://www.experts-exchange.com/visualbasic/Q_20317224.html
Text compare Date: 05/13/2002 02:14AM PST  
http://www.experts-exchange.com/visualbasic/Q_20299917.html
Application Control Date: 01/17/2002 06:51PM PST
http://www.experts-exchange.com/visualbasic/Q_20256679.html
Sort Data Date: 08/06/2001 02:10AM PST
http://www.experts-exchange.com/visualbasic/Q_20163789.html

Anthony
0
 
LVL 2

Expert Comment

by:priya_pbk
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!

-priya
0
 
LVL 18

Accepted Solution

by:
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!

Mike
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7185416
mdougan,

<off-topic>
Thanks for the vote of confidence.

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

Thanks,
Anthony
0
 
LVL 18

Expert Comment

by:mdougan
ID: 7186188
Anthony
<off-topic>
  Lets see if cyseng10 gets the hint ;)
</off-topic>
0
 
LVL 3

Expert Comment

by:Bahnass
ID: 7187926
Anthony
<off-topic>
     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
<off-topic>
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 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