On_The_Level
asked on
Save database used by VB via VB to other location???????
I am using VB6 and want to save a database (access 2000 database) via VB6 which i am using in my program. The database is open and is used to store info in and i want the user to be able to save the database in a place of there choice but not over writting the one used by the program by going to file and save as. There for it really has to copy the database used by the program which is stored in the same folder as the program (app.path) etc. and save it to another folder of the users choice.
I have got this bit to open the save as box but cant get anyfurther as to get it to atualy save the database.
Private Sub saveas_Click()
Dim sFile As String
With CommonDialog1
.DialogTitle = "Save As"
.CancelError = False
.Filter = "All Files (*.*)|*.*"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
Can anyone help cheers.
GM
I have got this bit to open the save as box but cant get anyfurther as to get it to atualy save the database.
Private Sub saveas_Click()
Dim sFile As String
With CommonDialog1
.DialogTitle = "Save As"
.CancelError = False
.Filter = "All Files (*.*)|*.*"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
Can anyone help cheers.
GM
ASKER
ok, how is this done then?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Just one question how would you load the database back up would you use the same method???
Cheers folks
Cheers folks
You can use this method to copy any file to anywhere.
But if the target files exists, it will be overwritten. Which is not possible if the database file is open. You have to close the currently open database to load the backed up database
Leon