Frank Boudreau
10-19-2004, 01:26 PM
I search on this forum but didn't find anything about memory consuming and opening recordset in an access database. The problem is when I open my recordset to select ~3 to 50 record in a table containing ~30 000 record. This load 17 megs in memory!! The database is 30 meg! I hope that the open load the complete table in memory instead of the 3 records? This is not a real problem on a lan but on a wan(intranet) it take 1-2 minutes to download 17 megs. Is there a way to avoid loading the complete table?
There's my connection code :
gcnnProjets.Open "PROVIDER=Microsoft.jet.OLEDB.4.0;DATA SOURCE=" & pathBd
gcnnProjets.CursorLocation = adUseClient
the recordset.open that eat 17 megs of memory when opening 3 records in 30 000:
grecContenu.Open "SELECT * FROM Projects WHERE WarrantyStatus = 'New'", gcnnProjets, adOpenDynamic, adLockOptimistic
I have test all lines to find that when I pass over this line, 17 megs is added to the memory used by VB in the task manager. Believe me!
Anyone has an idea to load only the 3 record needed in memory instead of the table? I have to write in this record, so they must be open in read/write mode and I need all fields in the record because any one can be modify
Thanks
Frank
There's my connection code :
gcnnProjets.Open "PROVIDER=Microsoft.jet.OLEDB.4.0;DATA SOURCE=" & pathBd
gcnnProjets.CursorLocation = adUseClient
the recordset.open that eat 17 megs of memory when opening 3 records in 30 000:
grecContenu.Open "SELECT * FROM Projects WHERE WarrantyStatus = 'New'", gcnnProjets, adOpenDynamic, adLockOptimistic
I have test all lines to find that when I pass over this line, 17 megs is added to the memory used by VB in the task manager. Believe me!
Anyone has an idea to load only the 3 record needed in memory instead of the table? I have to write in this record, so they must be open in read/write mode and I need all fields in the record because any one can be modify
Thanks
Frank