Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Compacting a Database

Hello everyone...

I am having a problem when I need to compact a database... The thing is that, because my application has several forms, I have to give the user the opportunity to close the program whenever he/she wants, instead of having to go back to the main form.

I also have to compact the database whenever I pres the End button. The problem is that in the other forms I have datagrids connected to ADO Data Controls, and whenever I try to compact the database, a message telling me that the database is open or being used is displayed, so I don't know if I better get rid of the end buttons in the other forms, or at least only compact the database when i close the application in the main form.

I also began to think that I could put this routine when the program loads, but I believe that this could slow the application.

Comments

  • bmiller1222bmiller1222 Member Posts: 107
    : Hello everyone...
    :
    : I am having a problem when I need to compact a database... The thing is that, because my application has several forms, I have to give the user the opportunity to close the program whenever he/she wants, instead of having to go back to the main form.
    :
    : I also have to compact the database whenever I pres the End button. The problem is that in the other forms I have datagrids connected to ADO Data Controls, and whenever I try to compact the database, a message telling me that the database is open or being used is displayed, so I don't know if I better get rid of the end buttons in the other forms, or at least only compact the database when i close the application in the main form.
    :
    : I also began to think that I could put this routine when the program loads, but I believe that this could slow the application.
    :
    :
    get rid of the end commands regardless because many people use them to navigate. i would suggest just making a menu item that will allow the user to compact whenever they want, as a database really only needs to be compacted about once per month, unless undergoing extremely heavy usage. Otherwise i would compact when the program closes.
  • zaib_awanzaib_awan Member Posts: 9
    : : Hello everyone...
    : :
    : : I am having a problem when I need to compact a database... The thing is that, because my application has several forms, I have to give the user the opportunity to close the program whenever he/she wants, instead of having to go back to the main form.
    : :
    : : I also have to compact the database whenever I pres the End button. The problem is that in the other forms I have datagrids connected to ADO Data Controls, and whenever I try to compact the database, a message telling me that the database is open or being used is displayed, so I don't know if I better get rid of the end buttons in the other forms, or at least only compact the database when i close the application in the main form.
    : :
    : : I also began to think that I could put this routine when the program loads, but I believe that this could slow the application.
    : :
    : :
    : get rid of the end commands regardless because many people use them to navigate. i would suggest just making a menu item that will allow the user to compact whenever they want, as a database really only needs to be compacted about once per month, unless undergoing extremely heavy usage. Otherwise i would compact when the program closes.
    :


    Before Compact Database Close all database connection then try to compact database. after Compacting re open all database connections
Sign In or Register to comment.