How to make MS Access process speed faster...??
I have a databse table that contain alot of record, when I click view all it take very long time to load it....? Can it solve?
Printable View
How to make MS Access process speed faster...??
I have a databse table that contain alot of record, when I click view all it take very long time to load it....? Can it solve?
I assume "view" is a command button. Can you show us its code?
How many records are in your database table?
How many are you bringing back with each "view"?
This sounds like you are doing it in Access by opening a table directly with the user interface. If so then you can not speed up the populating of the tables view in any way.
If you use SQL and indexes you can speed up the processing quite nicely. Of course selective viewing...
I have a command button for use to search therir record, when they click the comnad commnad button the record will populate to ListView...
My database record have more than 50000 record...... when user search all record it take long time to populate to the listview....
my sql like below...
Code:StrCache = "SELECT DISTINCT CustName,newNbr,Oldnbr,Location,Trans,FileView,Agent,Group From Main"
RsCache.Open StrCache, aConn
If RsCache.BOF = False Then
RsCache.MoveFirst
While Not RsCache.EOF
With ListView1.ListItems.Add(, , RsCache.Fields(0))
.ListSubItems.Add , , RsCache.Fields(1)
.ListSubItems.Add , , RsCache.Fields(2)
.ListSubItems.Add , , RsCache.Fields(3)
.ListSubItems.Add , , RsCache.Fields(4)
.ListSubItems.Add , , IIf(CBool(RsCache.Fields(5), "Yes", "No")
.ListSubItems.Add , , RsCache.Fields(6)
.ListSubItems.Add , , RsCache.Fields(7)
End With
RsCache.MoveNext
Wend
End If
1) The user won't be able to view all 50,000 records at any given time, he'll have to scroll/navigate
2) He'll only need all fields for the record/s he's interested in.
3) When creating a search algorithm, search the database not the listview and use primary keys.
Consider changing data presentation http://www.vbforums.com/showthread.p...ghlight=sample
Also to spped up loading time into the listview you can either use LockWindowUpdate API or hide the listview and reshow it after its populated. Use either of the two but not both as they wont help one another.