how to back up tables?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello,
i use to backup my tables using the adtg format (i.e. adPersistADTG used in
the save method of the ADO recordset).
I would like to build a procedure to recover my data from the tables saved.
Instead of writing lots of ADO code, i was wondering if it is possible to
reference to the table in the .adtg format in SQL.
Is it possible to have something like this working:
INSERT INTO restoredtablename SELECT * FROM current.project.path &
"\backup\savedtablename.adtg"

And if not,
is it possible to have something which can transfer data from tables saved
in .adtg format into the blank tables of the DB using ado? Something
different from having to go record by record, field to field.

I just need to take all records from each tables (adtg) and put them into
the blank access tables.

Thanks,
Rocco
 
Rocco,

No, but you might be better off saving the table as XML.

Public Sub Backup2XML(sTable As String, _
sTargetXMLFile As String, _
sTargetSchemaFile As String, _
sTargetXSDFile As String)

Application.ExportXML acExportTable, _
sTable, _
sTargetXMLFile, _
sTargetSchemaFile, _
sTargetXSDFile, , acUTF8, 1
End Sub

Public Sub RestoreFromXML(sXMLFile As String)
Application.ImportXML sXMLFile, acAppendData
End Sub

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
Back
Top