J
John Kounis
I recently converted from an Access 2000 .mdb file to an Access Data Project
(.adp file)/MSDE backend. As part of the upgrade, I moved my forms from the
..mdb file to the .adp file as well.
I have a form that references a table with about 50,000 records in it. When
the form was in a .mdb file, it would retrieve one record at a time and I
could use the record navigation buttons or search features to navigate
effortlessly through all 50,000 records.
Now that the form is in an access data project, it has a max records
property that defaults to 10,000. When I open the form, it starts a huge
query to download the first 10,000 records. This has 2 problems:
(1) I really don't need all 10,000 records. I might just search through the
table to find 10 or 20, so this is an excessive load on the server.
(2) As far as I can tell, it is impossible to navigate past the 10,000 that
were downloaded. (Yes, I can increase the max records to 50,000 or 100,000,
but then it would download the whole table... again a huge load on the
server).
Ideally, I would like to only download one record at a time. Then, if I
decided to, for example, skip to orders starting on 1/1/05, I could skip
49,000 records, and start browsing there.
As far as I can tell, the only way to do this with an MS Access form/ .adp
file front end/SQL server backend is to make a table with unbound controls
and to create a recordset programatically. Then I can populate the form with
data from the recordset. When the user wants to navigate, I would have to
update the controls on the form after I navigate the underlying recordset. I
would also need to update the recordset when a user edits a field on the
form. This means I need to write new code that performed the features that
were automatic in the previous version: Edit Record, Delete Record, Add
Record, Find Record, Filter, Next Record, Previous Record, First Record, and
Last Record, as well as code to populate the form in the first place.
Is this true? This seems like such a fundemental function--reading one
record at a time from a table in an SQL database--that I am surprised there
isn't an easier way to do it. Am I missing something?
John Kounis
(.adp file)/MSDE backend. As part of the upgrade, I moved my forms from the
..mdb file to the .adp file as well.
I have a form that references a table with about 50,000 records in it. When
the form was in a .mdb file, it would retrieve one record at a time and I
could use the record navigation buttons or search features to navigate
effortlessly through all 50,000 records.
Now that the form is in an access data project, it has a max records
property that defaults to 10,000. When I open the form, it starts a huge
query to download the first 10,000 records. This has 2 problems:
(1) I really don't need all 10,000 records. I might just search through the
table to find 10 or 20, so this is an excessive load on the server.
(2) As far as I can tell, it is impossible to navigate past the 10,000 that
were downloaded. (Yes, I can increase the max records to 50,000 or 100,000,
but then it would download the whole table... again a huge load on the
server).
Ideally, I would like to only download one record at a time. Then, if I
decided to, for example, skip to orders starting on 1/1/05, I could skip
49,000 records, and start browsing there.
As far as I can tell, the only way to do this with an MS Access form/ .adp
file front end/SQL server backend is to make a table with unbound controls
and to create a recordset programatically. Then I can populate the form with
data from the recordset. When the user wants to navigate, I would have to
update the controls on the form after I navigate the underlying recordset. I
would also need to update the recordset when a user edits a field on the
form. This means I need to write new code that performed the features that
were automatic in the previous version: Edit Record, Delete Record, Add
Record, Find Record, Filter, Next Record, Previous Record, First Record, and
Last Record, as well as code to populate the form in the first place.
Is this true? This seems like such a fundemental function--reading one
record at a time from a table in an SQL database--that I am surprised there
isn't an easier way to do it. Am I missing something?
John Kounis