Automating a Compact

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark

    #1

    Automating a Compact

    Hi all and thanks in advance,

    I have a frontend/backend scenario where the backend has a tendency to bloat quit a lot over a period of about 5 days. Once compacted, there is not problem but it needs to be done on a regular basis. From the administrator form, I can set the value of a field within the backend so that every minute, the main form of the database queries the value within this field and if it meets a certain criteria, a pop-up appears informing the users that it will close in 5 mins. Once all the frontends have closed, I can then compact the backend.
    I want to be able to automate this task during the night when there are only a few users accessing the frontend. I have set a scheduled task to open the backend on a PC which is never used during the night. Once the backend is open, the value is changed so that all frontends are closed. Once closed, I can then get the compact to run. Once finished, I can get the value changed so that it doesn't boot people out and close the backend. The problem I have is that due to Access security, I am required to log into the database with a username and password when the scheduled task runs. Is there any way that I can get the database to enter the username and password automatically similar to the way in which I use a command to make sure that it uses the correct workgroup file when opening?

    I am using Access 2002 on a XP platform.

    Regards,

    Mark
  • Mark

    #2
    Re: Automating a Compact

    Hi all,
    I have managed to figure this out on my own using the /user & /psw command lines.

    Cheers anyway,

    Mark
    "Mark" <mark.reed75@nt lworld.com> wrote in message news:BvlSc.38$b k3.27@newsfe3-gui.ntli.net...
    Hi all and thanks in advance,

    I have a frontend/backend scenario where the backend has a tendency to bloat quit a lot over a period of about 5 days. Once compacted, there is not problem but it needs to be done on a regular basis. From the administrator form, I can set the value of a field within the backend so that every minute, the main form of the database queries the value within this field and if it meets a certain criteria, a pop-up appears informing the users that it will close in 5 mins. Once all the frontends have closed, I can then compact the backend.
    I want to be able to automate this task during the night when there are only a few users accessing the frontend. I have set a scheduled task to open the backend on a PC which is never used during the night. Once the backend is open, the value is changed so that all frontends are closed. Once closed, I can then get the compact to run. Once finished, I can get the value changed so that it doesn't boot people out and close the backend. The problem I have is that due to Access security, I am required to log into the database with a username and password when the scheduled task runs. Is there any way that I can get the database to enter the username and password automatically similar to the way in which I use a command to make sure that it uses the correct workgroup file when opening?

    I am using Access 2002 on a XP platform.

    Regards,

    Mark

    Comment

    Working...