How To…Save/Load Archives from a Database


“How do I save/load archive files to and from a table in my database?”


To save a file to DB, export the archive to memory stream using the TppStreamDevice.OutputStream property, then copy that to a TBlobStream which can easily be saved to a DB.
If the archives are already saved to file, create a TFileStream and use the same technique.

Loading archives from a database can easily be done using the TppDBArchiveReader object available from the Delphi component pallet.


Sample Delphi code: