A.J. Venter wrote:
This brings up a few questions though: 1) How can I store a string into a TMemoryStream ? I know that TStringList has a loadFromStream method - but how d I go the other way around ?
Take a look at TStringStream if you want a stream operating on a string. For the purpose of storing an image file into a database, I'd recommend to use a BLOB in the database itself. If you are using the SQLdb components: I'm not sure whether TPQConnection supports Blob parameters (looking at the source, it appears it does not). Otherwise you need to take care of properly escaping the binary data in the query. You could also use Base64 encoding to convert the binary data to text. (Note: there is a base64 unit in the FCL.) Regards, Bram _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives