?
Solved

Flexgrid Large Dataset Problem

Posted on 2003-03-22
7
Medium Priority
?
574 Views
Last Modified: 2007-12-19
Hi all,

I am currently making a VB6 application to display data from a database. Unfortunately sometimes the users need to see 6000 - 9000 records in one go in a MSHFlexgrid. The amount of time it takes to open this window can be around 10 seconds, although the query itself is not the problem. I really need to use the MSHFlexgrid as other code has been developed around for it.

I have looked around on the web and tried only displaying records that would be visible to the user (with the flexgrids RowIsVisible and TopRow properties) but with no success. Can anyone offer any help with this?

I am currently using the .DataSource = recRecords method.

Thanks for any help.
0
Comment
Question by:freddieheineken
[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
7 Comments
 

Expert Comment

by:Fuisseran
ID: 8189382
Would it be practical to have users page through the data?
0
 

Author Comment

by:freddieheineken
ID: 8189498
Thanks Fuisseran,

Currently users can sort columns by clicking on column headers, and also search for keywords in the whole recordset. So long as these functions remain paging would be great! How would i go about this?
0
 

Expert Comment

by:Fuisseran
ID: 8189703
Once you have you RecordSet set these properties
RecordSet.PageSize 'how many records to show on each page
RecordSet.AbsolutePage 'the current page the user is on

Then you have to fill your grid with a loop instead of assigning it to teh datasource

Dim i As Integer
i = RecordSet.AbsolutePage
Do While RecortSet.AbsolutePage = i And Not RecordSet.EOF
'put code here to fill the grid
Loop

As long as you perform all actions on the RecordSet your search and stuff should.  Still unsure as to why you would want to display 9000 records all at once but this might help.  The prinicple here is somethign similar to an internet search page where you can page thorugh the results of your search hope this helps.
0
Independent Software Vendors: 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!

 

Author Comment

by:freddieheineken
ID: 8204560
well i have messed around with this for a while, trying to load a page in and then have the code load more data when the flexgrid was scrolled, and leaving filters, search function etc., but it caused more problems than it solved. I have gone back to the .DataSource = rs method.
I needed a flexgrid simply to show a list of all records in a table (name, address etc.) where there was no obvious filter. It is strange that in Access running the query brings and fills up the grid almost instantly.
0
 

Author Comment

by:freddieheineken
ID: 8211890
ok after trying lots of different methods i have resorted to a datagrid that fills within a second compared to 7-8 seconds with a mshflexgrid. i will need to redo sorting, querying etc. but i really needed to make it as fast as the DOS system I was replacing! incidently that brought up the same number of records in 1 second and allowed autocomplete searches....

for anyone looking for more info on this i found the following link:

http://www.google.fr/search?q=cache:Tub58W5jCI0C:p2p.wrox.com/archive/vb_howto/2003-01/18.asp+datagrid+flexgrid+datasource+speed&hl=fr&ie=UTF-8

thanks anyway fuisseran.


0
 

Expert Comment

by:CleanupPing
ID: 8531816
Hi freddieheineken,
This old question (QID 20559903) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 

Accepted Solution

by:
DigitalXtreme earned 0 total points
ID: 8537459
question PAQ'ed and points refunded

DigitalXtreme
CS Moderator
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

764 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