Flexgrid Large Dataset Problem

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.
freddieheinekenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FuisseranCommented:
Would it be practical to have users page through the data?
0
freddieheinekenAuthor Commented:
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
FuisseranCommented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

freddieheinekenAuthor Commented:
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
freddieheinekenAuthor Commented:
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
CleanupPingCommented:
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
DigitalXtremeCommented:
question PAQ'ed and points refunded

DigitalXtreme
CS Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.