Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Making it easy for my users to backup

Discussion in 'Information Technology' started by Lateral, Jul 28, 2006.

  1. Lateral

    Lateral
    Expand Collapse
    Guest

    Hi Guys

    I am nearly ready to deploy a new application and want to add a menu item to
    my SwitchBoard that will enable the user to simply "click" it and it will
    take a complete copy of the database. I have split the application into FE
    (Front end) and BE (Back end). Ideally, each time they click the "Backup"
    button, it should create a unique backup file. For example, if the BE DB is
    called "test_be" then the backup file should be valled "test_be_00001". If
    they click it again, the the name should be "test_be_00002" etc.

    Any ideas?

    Thanks
    Regards
    Greg
     
  2. Loading...

    Similar Threads Forum Date
    Partition 1947 - The Making Of Refugees History of Sikhism Mar 18, 2015
    Making The Change With Hope & Faith - Sikh Advocate Prabhjot Singh, Md Sikh Youth Mar 11, 2015
    Heritage Sikhs making Their History in Malaysia History of Sikhism May 18, 2013
    Inspirational Making a Difference: A School for Girls in Kenya Videos Mar 25, 2013
    Canada Star-struck’ security and limo drivers? Businesses complain TOIFA staff are making racist demands Breaking News Mar 18, 2013

  3. Smartin

    Smartin
    Expand Collapse
    Guest

    Lateral wrote:
    > Hi Guys
    >
    > I am nearly ready to deploy a new application and want to add a menu item to
    > my SwitchBoard that will enable the user to simply "click" it and it will
    > take a complete copy of the database. I have split the application into FE
    > (Front end) and BE (Back end). Ideally, each time they click the "Backup"
    > button, it should create a unique backup file. For example, if the BE DB is
    > called "test_be" then the backup file should be valled "test_be_00001". If
    > they click it again, the the name should be "test_be_00002" etc.
    >
    > Any ideas?
    >
    > Thanks
    > Regards
    > Greg


    VBA code to do this is not terribly difficult, but I would ask what
    would you do with so many backups of the BE? If the idea is to keep a
    "good" copy on demand from each user, how will you determine which
    user's backup is the one to restore in the event of such a need?

    --
    Smartin
     
  4. Lateral

    Lateral
    Expand Collapse
    Guest

    Hi,

    The idea is to make it as simple as possible and a "no brainer". I might
    even have it so that it takes a backup each time the application is started.
    Do you have the VBA code to do this?

    Regards
    Greg

    "Smartin" wrote:

    > Lateral wrote:
    > > Hi Guys
    > >
    > > I am nearly ready to deploy a new application and want to add a menu item to
    > > my SwitchBoard that will enable the user to simply "click" it and it will
    > > take a complete copy of the database. I have split the application into FE
    > > (Front end) and BE (Back end). Ideally, each time they click the "Backup"
    > > button, it should create a unique backup file. For example, if the BE DB is
    > > called "test_be" then the backup file should be valled "test_be_00001". If
    > > they click it again, the the name should be "test_be_00002" etc.
    > >
    > > Any ideas?
    > >
    > > Thanks
    > > Regards
    > > Greg

    >
    > VBA code to do this is not terribly difficult, but I would ask what
    > would you do with so many backups of the BE? If the idea is to keep a
    > "good" copy on demand from each user, how will you determine which
    > user's backup is the one to restore in the event of such a need?
    >
    > --
    > Smartin
    >
     
  5. Tom Wickerath

    Tom Wickerath
    Expand Collapse
    Guest

    Hi Greg,

    Check out the following article contributed by Access MVP Jeff Conrad:
    http://www.access.qbuilt.com/html/custom_login.html

    Scroll approximately 2/3 of the way down. You should see a section titled "A
    Custom Login Form Can Provide Multiple Solutions". Paragraph 2 includes the
    following:

    <Begin Quote>
    "I needed an easy way to back up the back end (BE) data tables. A simple
    button on the form copies the whole BE file to a specific folder and date
    stamps it. Please note that this particular setup was for a single
    workstation application and would not be applicable for a multi-user
    scenario. Since my custom login form is in an unsecured database file with no
    links to the BE data tables, I do not have to worry about copying the file
    while it is in use. Even if by chance the tables are being accessed, my error
    handling stops the process and flashes up a nice message box for the user.
    This is a very easy process for the users to make a backup."
    </End Quote>

    Although Jeff's sample does not include the Backup command button shown in
    the screen shot, you can very easily add a button with a click event
    procedure that calls the CompactDatabase method:

    Copies and compacts a closed database, and gives you the option of changing
    its version, collating order, and encryption. (Microsoft Jet workspaces only).

    Syntax
    DBEngine.CompactDatabase olddb, newdb, locale, options, password

    You can look up this method in Access VBA Help for additional details.


    Tom Wickerath
    Microsoft Access MVP

    http://www.access.qbuilt.com/html/expert_contributors.html
    http://www.access.qbuilt.com/html/search.html
    __________________________________________

    "Lateral" wrote:

    > Hi,
    >
    > The idea is to make it as simple as possible and a "no brainer". I might
    > even have it so that it takes a backup each time the application is started.
    > Do you have the VBA code to do this?
    >
    > Regards
    > Greg
     
  6. Lateral

    Lateral
    Expand Collapse
    Guest

    Thanks Tom

    Regards
    Greg

    "Tom Wickerath" wrote:

    > Hi Greg,
    >
    > Check out the following article contributed by Access MVP Jeff Conrad:
    > http://www.access.qbuilt.com/html/custom_login.html
    >
    > Scroll approximately 2/3 of the way down. You should see a section titled "A
    > Custom Login Form Can Provide Multiple Solutions". Paragraph 2 includes the
    > following:
    >
    > <Begin Quote>
    > "I needed an easy way to back up the back end (BE) data tables. A simple
    > button on the form copies the whole BE file to a specific folder and date
    > stamps it. Please note that this particular setup was for a single
    > workstation application and would not be applicable for a multi-user
    > scenario. Since my custom login form is in an unsecured database file with no
    > links to the BE data tables, I do not have to worry about copying the file
    > while it is in use. Even if by chance the tables are being accessed, my error
    > handling stops the process and flashes up a nice message box for the user.
    > This is a very easy process for the users to make a backup."
    > </End Quote>
    >
    > Although Jeff's sample does not include the Backup command button shown in
    > the screen shot, you can very easily add a button with a click event
    > procedure that calls the CompactDatabase method:
    >
    > Copies and compacts a closed database, and gives you the option of changing
    > its version, collating order, and encryption. (Microsoft Jet workspaces only).
    >
    > Syntax
    > DBEngine.CompactDatabase olddb, newdb, locale, options, password
    >
    > You can look up this method in Access VBA Help for additional details.
    >
    >
    > Tom Wickerath
    > Microsoft Access MVP
    >
    > http://www.access.qbuilt.com/html/expert_contributors.html
    > http://www.access.qbuilt.com/html/search.html
    > __________________________________________
    >
    > "Lateral" wrote:
    >
    > > Hi,
    > >
    > > The idea is to make it as simple as possible and a "no brainer". I might
    > > even have it so that it takes a backup each time the application is started.
    > > Do you have the VBA code to do this?
    > >
    > > Regards
    > > Greg
     
  7. Smartin

    Smartin
    Expand Collapse
    Guest

    Lateral wrote:
    > Hi,
    >
    > The idea is to make it as simple as possible and a "no brainer". I might
    > even have it so that it takes a backup each time the application is started.
    > Do you have the VBA code to do this?
    >
    > Regards
    > Greg


    I don't have it anymore as I left it behind at a previous employer, but
    the gist of the solution was this:

    + define a file naming rubric (as you have done) and a single location
    in which to store backups
    + when creating a new backup,
    ++ parse the destination directory for files matching the rubric,
    keeping track of the sequence number in each case, in order to determine
    the highest sequence number present (use the Dir() function to enumerate
    file names)
    ++ save the new backup with the next number in sequence

    HTH

    --
    Smartin
     

Share This Page