Article View: borland.public.cppbuilder.database.ado
Article #2369Re: Advice Please - ADO Archiving
From: Viatcheslav V. Vassiliev
Date: Fri, 05 Sep 2003 12:07
Date: Fri, 05 Sep 2003 12:07
48 lines
2710 bytes
2710 bytes
Save backups into another Access database, or even you may have one database
for every month. Then when your user needs older records you do
SELECT * FROM MyTable IN "C:\Backups\2003_04.mdb"
UNION
SELECT * FROM MyTable IN "C:\Backups\2003_05.mdb"
Do not forget to compact database when you place it into backup.
----------------------------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server, MS Jet (MS Access)
and Interbase (through OLEDB) databases.
"Andrew" <alamb@tynetec.co.uk> �������/�������� � �������� ���������:
news:3f584ba5@newsgroups.borland.com...
> Hi All,
>
> I have an app that has a TADOConnection, TADOTables, TADOQuery etc
> connecting to an Access database, every day I archive the records older
than
> 30 days using TADOTable->SaveToFile("Filename", Format);.
>
> Now if someone wants to query the data that has been archived I have to
> re-load the saved data into a TADOTable using
> TADOTable->LoadFromFile("Filename");, then copy each record to a temporary
> table within the database, then query that table to retrieve the records
> that the user was looking for. Once the query is complete I delete all the
> records in the temporary table and all is complete, I perform a compact
and
> repair on the database every night when the archive operation is complete
so
> the database tables are kept to a minimum size and the temporary table
does
> not grow to large.
>
> This seems straight forward enough but a little contrived, I was wondering
> if anyone has a better suggestion or is this the only way to do this sort
of
> action.
>
> Thanks in advance
>
> Andrew
>
>
Technical Details
Message-ID:
<3f587dfa$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f584ba5@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,94a848929fea2f7a X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-09-05 05:21:35 PST From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3f584ba5@newsgroups.borland.com> Subject: Re: Advice Please - ADO Archiving Date: Fri, 5 Sep 2003 16:07:57 +0400 Lines: 51 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 213.234.218.42 Message-ID: <3f587dfa$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1062764026 213.234.218.42 (5 Sep 2003 05:13:46 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail