I wonder, does a BLOB empty exist? or is just a blob with null content?
for my purposes, I need to know if I already have stored something on a blob, otherwise, call a routine to fill blob field.
When I compare: table.blob-field <> ? is returning no, but whe I COPY-LOB FROM table.blob-field TO FILE "C:\temp\2.pdf".
I got an empty 2.pdf file.
What am I missing?
TIA
Jorge Octavio
I guess I am confused by your question.... <> ? returns no when the field is actually ?.
Run this to see the different values:
display length(table.blob-field) (table.blob-field = ?) (table.blob-field <> ?).
Thanks.
I got, respectivelly
? yes no
SO i guees the way to tell if a blob is empty is "length(b) = ?" , what you thin?
Any of those approaches work as long as you react appropriately to the answer.
if ( length(b) > 0) = TRUE then outputpdf. /* false for ? or 0 */
if (b <> ?) = TRUE then outputpdf. /* false when it is ? */
if (b = ? ) = FALSE then outputpdf. /* true when it is ? */
I suppose LENGTH(blob-field) > 0 may be the "safest" .
LENGTH(blob-field) will force Progress to read BLOB from disk.
Of course, it's not a problem if you're going to read it anyway. But when you just need to know if the field is empty or not then (table.blob-field ne ?) is, IMHO, a better solution.
Regards,
George