Exporting the data of a table before deleting it work like a charm.
Example :
OUTPUT TO VALUE("C:\mytable.d") APPEND.
EXPORT mybd.mytable.
OUTPUT CLOSE.
DELETE mybd.mytable.
However, I've yet to make it work when using a buffer handle instead. The following exports an integer instead of the data deleted.
DEF INPUT PARAM hlTableToDelete AS HANDLE NO-UNDO.
...
OUTPUT TO VALUE("C:\" + hiTableToDelete:NAME + ".d") APPEND.
EXPORT hlTableToDelete:HANDLE.
OUTPUT CLOSE.
hlTableToDelete:BUFFER-DELETE().
Which syntax is needed for command export
to work and actually export the data of the buffer handle?