Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Archiving database records

Status
Not open for further replies.

Sam13

Technical User
May 31, 2001
5
US
I need to build an archiving function into my project. Basically, I need to be able to remove records from the database that are completed (fldDisposition <> 'none') and save them elsewhere either in a text file or in another database. I can easily create this recordset with an ado control or with a data environment, and I can easily create a comma delimeted text file.

In general what are the best ways to build this function? Are there any good resources on the web on how to do this?

I've never built this kind of function before and I thought I'd do some research first. Thanks for the input.

 
I have done this type of thing several times, and this always worked for me.

First, build a duplicate database.
Second, create a recordset (using whatever method is prefered by you) holding all the records you want to archive.
Third, use SQL to do an INSERT INTO the archive database.
Fourth, build a routine that will verify those records exist in your archive Db.
Fifth, do a DELETE FROM your active database.

I've also build in a function which allows user to dearchive records, and all this function did was copy stuff from archive back to active, and delete from archive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top