|
-
May 9th, 2013, 08:32 AM
#1
Thread Starter
Addicted Member
[RESOLVED] MDB file
Hi
I have a program that use mdb file to store data.
What I will do with this is to backup the file
I know how to do that, but the question is
how to make backup of the file so I can
go back and restore the file from 10 Days ago.
I mean how to number the file we say
like this phone.mdb
phone.mdb1
and so on
Lenny
-
May 9th, 2013, 10:52 AM
#2
Re: MDB file
You can add date/time stamp to file name. Try something like this:
Code:
FileCopy "c:\source_folder\mydata.mdb", "c:\backup_folder\mydata" & Format(Now, "mmddyyy_hhnnss") & ".mdb"
-
May 9th, 2013, 12:28 PM
#3
Thread Starter
Addicted Member
Re: MDB file
Thanks it works just fine
How can I get the file back from the backup dir?????
-
May 9th, 2013, 01:37 PM
#4
Re: MDB file
Same way... only in reverse... just copy the backup over the original.
-tg
-
May 9th, 2013, 01:53 PM
#5
Thread Starter
Addicted Member
Re: MDB file
Hi
Okej it works just with one file
If I have several files with different date and time
how to get one of them back.
file.mdb20130509_18:48
file.mdb20130509_19:48
file.mdb20130509_20:18
file.mdb20130509_20:48
-
May 9th, 2013, 03:17 PM
#6
Re: MDB file
Maybe you could put the files in a FileListBox.
You could see what files are available and select the desired one from the list.
-
May 10th, 2013, 12:16 AM
#7
Re: MDB file
If I were you I'd use Rhino's suggestion for the file and append the Date and Time to the Filename rather than Filetype. That will make it (slightly) easier to filter if you're going to use a FileListBox.
-
May 10th, 2013, 01:08 AM
#8
Re: MDB file
 Originally Posted by Bonzo2008
Hi
Okej it works just with one file
If I have several files with different date and time
how to get one of them back.
file.mdb20130509_18:48
file.mdb20130509_19:48
file.mdb20130509_20:18
file.mdb20130509_20:48
In addition to RhinoBull's and Doogle's recommendations, you also shouldn't use a colon (":") anywhere in the filename because doing so creates or accesses the Alternate Data Streams (ADS). See Streams for more info.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
-
May 10th, 2013, 06:36 AM
#9
Thread Starter
Addicted Member
Re: MDB file
 Originally Posted by Bonnie West
In addition to RhinoBull's and Doogle's recommendations, you also shouldn't use a colon ( ":") anywhere in the filename because doing so creates or accesses the Alternate Data Streams (ADS). See Streams for more info.
Hi
I solved it
-
May 10th, 2013, 07:23 AM
#10
Re: MDB file
REF: "I solved it"
If so, please make this thread as RESOLVED, under 'thread tools'.
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
|