Refreshin' MSHFlexGrid Optimisation

sethindeed
09-05-2001, 10:09 AM
Somebody knows how to speed up the Refresh process of an MSHFlexGrid. I am calling a recordset into an ADO recordset, then refreshing the grid. THe problem is that it is quite slow when I have more than 3000 records...
Thanx

BillSoo
09-05-2001, 11:50 AM
Set the VISIBLE property of the flexgrid to FALSE. Then do your updates. Then set the VISIBLE property back to TRUE.

As long as you don't have any doevents in your code where you load the update, the flexgrid won't actually have time to disappear.

Use timing functions, like timeGetTime, to figure out how much time you saved and let us know....


"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

sethindeed
09-05-2001, 12:06 PM
Hum...I was already doing this :)

BillSoo
09-05-2001, 12:13 PM
In that case....how about posting some code....

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

sethindeed
09-05-2001, 12:21 PM
Let's see. It looks like this right now :

MainFilter = "Select * From rqtGlobal where AssignedTo ='" &lblAssignedTo &"'"
MSFlexGrid1.Visible=false
DoEvents
AdoConn.Close
With AdoConn
.ConnectionString = strConnect
.Open
End With
Cmd1.ActiveConnection = AdoConn
Cmd1.CommandText = MainFilter
rsConn.Open Cmd1, , adOpenStatic, adLockReadOnly
Set MSFlexGrid1.Recordset = rsConn
MSFlexGrid1.Visible=True

Is it possible to optimize it more than that ( it is getting slow only for 3000 or more records )

Anis
09-05-2001, 09:01 PM
i think the visible property is the only best solution..
i also have been having problem in Msflexgrid..
coz i was populating my flexgrid with about Database of 5000 + records.. And i am still stuck in terms of optimizing it more..


anis
"Miles to Go Before I Sleep!!........."

dcl3500
09-05-2001, 09:19 PM
If you working with an Access Jet db then use DAO. It is truly faster than ADO against a Jet db.

Don

Time is the best teacher; unfortunately it kills all its students.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum