Error: You cannot export an empty BLOB (Attachment)"

Hi,

I am importing a document with these lines of code:

FileName := Attachment.IMPORT(’*.BMP’,TRUE);
CurrForm.SAVERECORD;

The import works (I think). There is a * in the Blob field. Later I want to export it, and I use this code:

IF (Attachment.HASVALUE) THEN
Attachment.EXPORT(‘C:/AttachmentTMM.BMP’,TRUE);

I keep getting the error: “You cannot export an empty BLOB (Attachment)” Any ideas, anyone??

Thanks in advance!

It struck me the moment i posted! I forgot to CALCFIELDS. [:)]

Hi,

I feel Attachment is not able to read the BLOB.try to use calcfield for that picture like

recEmployee.CALCFIELDS(Picture); where recEmployee is the employee and picture is the filed in that employee table.

Hi,

I hope u need to use calcfield function for that picture before exporting like

recEmployee.CALCFIELDS(Picture);

where recEmployee is the employee table and picture is the field in employee table