Why the access database is so slow

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gracepaul
    New Member
    • Jul 2008
    • 28

    Why the access database is so slow

    hi all,

    i am developing a desktop application with c# and access database. When i am trying to create a new record and trying to display it ,it won't come in a single stress. I have to call the display function again through a button click event for displaying it. The modification/insertion of the newly created record already done in database. But it can not see at the same time due to the slowness of access database.. If anyone have an idea please help me...

    Thanks in advance
    Grace
  • rpicilli
    New Member
    • Aug 2008
    • 77

    #2
    Hi there,

    Did you try to refresh your datacomponent that is bounded to the database?

    Rpicilli

    Comment

    • Cristo4
      New Member
      • Nov 2008
      • 2

      #3
      Did you try the "Compact/Repair Access Database Utility" option from the Tools menu? Sometimes when I made ALOT of database mutations this option helped me out on maintaining some performance.

      Comment

      • cloud255
        Recognized Expert Contributor
        • Jun 2008
        • 427

        #4
        Hi There,

        You state that this is a desktop app, by definition (my understanding at least) this means only one person accessing a local database (not client) server.

        You then do not need to get the data back from the database as soon as the write is complete. If you do not use data binding and instead create the connection to the DB yourself and use an object to update the DB, you can simply display the in memory object and then wait for a while (few seconds, minutes, next application startup) before reading from the database again.

        This approach will make your app. faster as you only use Access when its necessary.

        Good luck

        Comment

        • balabaster
          Recognized Expert Contributor
          • Mar 2007
          • 798

          #5
          My initial thoughts are: Because it's Access...what do you expect?

          However, a more productive answer would be that using some data caching mechanism is likely to be far more beneficial as was previously suggested.

          Load the data into an object/objects in memory that represent the model of your data. When working with the data on screen, read and write the data to the data model. When exiting the app, save the data back from the data model to the database where items have changed.

          A great way to have most of this handled seamlessly is to look into LINQ. It's marvelous at establishing this data cache and with a very small amount of code you can load the data into your application, work with it "off-line" and then calling the SubmitChanges() method will submit the changes back to the database. With a small amount of checking, you can even check for data concurrency to make sure that the data being saved back is still current, effectively allowing multiple users access to read/write the same data with very little effort.

          Comment

          Working...