TECH TIP: Loading an Archive File to a BlobĀ (or memory stream)
You can easily write a routine to take a .RAF file and load it into a blob field or a TMemoryStream:
1 2 3 4 5 6 |
myFileStream := TFileStream.Create('myArhcive.RAF', fmOpenRead); myFileStream.Position := 0; myBlobField.LoadFromStream(myFileStream); myFileStream.Free; |
OR
1 2 3 4 5 6 |
myMemoryStream := TMemoryStream.Create; {note: passing 0 as the second parameter will copy the entire stream} myMemoryStream.CopyFrom(myFileStream, 0); myMemoryStream.Free; |