Article View: borland.public.cppbuilder.database.ado
Article #2367Advice Please - ADO Archiving
From: Andrew
Date: Fri, 05 Sep 2003 08:38
Date: Fri, 05 Sep 2003 08:38
23 lines
1940 bytes
1940 bytes
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:
<3f584ba5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,94a848929fea2f7a,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-09-05 01:45:21 PST From: "Andrew" <alamb@tynetec.co.uk> Newsgroups: borland.public.cppbuilder.database.ado Subject: Advice Please - ADO Archiving Date: Fri, 5 Sep 2003 09:38:56 +0100 Lines: 25 Organization: Tynetec Ltd X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 80.177.44.179 Message-ID: <3f584ba5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1062751141 80.177.44.179 (5 Sep 2003 01:39:01 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail