|
-
Nov 13th, 2000, 09:29 AM
#1
Thread Starter
Lively Member
Hi! I have a simple newbie question.
I just made my first database application, I'm currently using VB6 and access 97. I want to be able to save and restore backups of the database. What's the best way of doing this?
Is is possible for the user of my program to be able to save the database in a different directory and/or different name? Similar to saving a word document file. I also want the user to restore/open any database saved by the application. Similar to opening a word document.
Is this the right approach in doing this? Or is there a better way?
Thanks in advance for all the help
-
Nov 13th, 2000, 09:49 AM
#2
Fanatic Member
If you are just using Access, the .mdb file will contain all code and data. If you are using VB as well, you will need all the runtime files that your package wizard has probably cocked up and the .EXE - the runtime stuff is readily available, but ensure that you have a copy of the .EXE and the original project/forms (i.e. .FRM, .VBP etc., in case you have to rebuild.
BTW, If you are doing it for a client, keep a copy yourself. I once had a situation where I assigned copyright, handed over the code, destroyed my copies and they lost the files. Making changes from just the .EXE was quite diff.!
Cheers,
Paul
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 13th, 2000, 10:26 AM
#3
Thread Starter
Lively Member
Thanks for the advice, but what I meant with the backups is I wanted to implement a feature in my program where the user of the program can save and restore the main database of the application.
Sorry if my question was unclear
-
Nov 13th, 2000, 10:31 AM
#4
Fanatic Member
For the database portion check out the Compact and Repair options in Access. You will have to close the database and then compact into a new file. You can then get the user to select a directory/filename to compact into. perfectly good way of doing it.
Good chance to let them access the Repair functionality in Access as well, they WILL need it at some stage.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 13th, 2000, 10:49 AM
#5
Thread Starter
Lively Member
Thanks i'll go look at that, is there a way though to do that through VB code?
-
Nov 14th, 2000, 05:55 AM
#6
Fanatic Member
Call the appropriate methods through Automation using Access as an object
i.e.
Dim oApp As Access Application
Set oApp = New Access Application
Dim db As Database
Set db = OpenDatabase(...)
db.Compact (or something)
I can't quite remember the syntax, but look up Compact and Repair.
Cheers,
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|