to compact the database you can have a look at the forums built in one.
with regards to the back up feature.. i had required a simular feature what i did was
use FSO to make a copy of the database (was a file in my case but .mdb also works as i tested it).
to prevent erros etc i had copied the database on the webserver within
a folder that is just made with the folder name being the date and time
of creation.
one place to look for FSO is www.devguru.com
below is the code that creates a folder then copies the file.
Set filesys = CreateObject("Scripting.FileSystemObject")
' check if the file exists
If filesys.FileExists(strAttachment) Then
set filetxt = filesys.GetFile(strAttachment)
StrDateAndTime = DateAdd("h",+0,NOW())
strTempPath = Day(StrDateAndTime) & "-" & Month(StrDateAndTime)
& "-" & Year(StrDateAndTime) & "_" &
Hour(StrDateAndTime) & "-" & Minute(StrDateAndTime) & "-"
& Second(StrDateAndTime)
If Not filesys.FolderExists(strBackupPath & strTempPath) Then
Set newfolder = filesys.CreateFolder(strBackupPath & strTempPath)
filesys.CopyFile "path to file to back up", strBackupPath & strTempPath & "\"
Set filesys = NOTHING
End If
|
replace strAttachment with the path to the .mdb file
Edited by dj air - 15 March 2005 at 6:38am