Results 1 to 8 of 8

Thread: Backup for *.mdb

  1. #1
    747
    Guest

    Post Backup for *.mdb

    Guys, I have an mdb file for my application and I want user to make backup of this database on regular basis.

    Can anyone help me by providing a code for how to save a copy of a file. I tried with CommonDialog but its not the way I want.

    Thanks in advance

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Just use the FileCopy method on the mdb
    VB Code:
    1. FileCopy "C:\my.mdb", "C:\backup.mdb"

  3. #3
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Compress

    May want to compress it first (less to copy).
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  4. #4
    DaoK
    Guest
    May want to compress it first (less to copy).
    You want to compress it like winzip do ? well I think it will be hard to code, good luck.

  5. #5
    747
    Guest
    I might go with Access Compact Database utitlity

  6. #6
    747
    Guest
    It's not working, getting an error and I know why, it's because my application is using a same database file.

    Any alternate way????

  7. #7
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Open connection

    You mus close any active connection for the copy or the compaction (i did mean Access compression) to take place
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  8. #8
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    I would recomend using the file copy API it will copy it even if it is in use.
    I would recomend compacting the database on startup of the program.
    If its a Multi user program, create a compact program to compact it on startup.

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