CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Location
    Jerusalem, Israel
    Posts
    251

    PRB: Refreshing large database tables

    I'm developing a database application, connected to an Access database. In my application I'm using data controls to retrieve data from database tables. Some of the tables store tens and hundreds of thouthands records, so refreshing of data controls takes few minutes to execute and, therefore, undesirable.
    My problem that the database can be changed from an external application, so the data controls should be able to work with added/changed data. My recordsets are dynaset type, so I assume, that thay should be connected to the database, and able to get recent changes from it, but I cannot find, how can I achieve this. Maybe someone can halp me with this or suggest another approach of database connecting, so that the full refresh would be unnessesary?
    I think, it's common problem in large database programming, so there should be some solutions of it? Am I wrong?

    Thank you in advance,

    Jack.

  2. #2
    Join Date
    Feb 2000
    Location
    Indiana
    Posts
    308

    Re: PRB: Refreshing large database tables

    Do you actually need all of the data in the table to be sent to the control? Why not use result sets to grab chunks of information as needed?


  3. #3
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: PRB: Refreshing large database tables

    This is a problem i encountered a while ago, but the solution is only a bypass, and i'm not even sure if you are able to do this but, if you can, add a field to the table, a field in wich you keep the date and time when the record was last changed. This way when you get the table the first time, you can store it locally on your HD, when checking for changes (like every 5 minutes) do a query on the table filtering only there records who have a date/time later then the moment you got the table from the DB. With these records, update your locally stored db.

    There one big drawback on this, the DB will grow quit a bit, if you have to add a field to about 50.000 records. This can make the DB a lot bigger so be sure to compress the DB from time to time. Anyway, this might just not be a complete solution, but it sure saves you a lot of time.

    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  4. #4
    Join Date
    May 1999
    Location
    Jerusalem, Israel
    Posts
    251

    Re: PRB: Refreshing large database tables

    Unfortunately, I need it all, for example I need to allow the user to view all records in the grid etc. :-(

    Jack.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured