I'm trying to save and load an Object into a database Field of type BLOB. Is this possible? And if yes, how?
Example:
Saving an instance of vk.class.Offer.cls
to DB-Table OfferHead
and loading objOffer
of type vk.class.Offer.cls
from DB-Table OfferHead
.
I'm trying the following code:
DEFINE VARIABLE objAngebot AS CLASS vk.class.Angebot NO-UNDO.
DEFINE VARIABLE oObj as MemPTR NO-UNDO.
DEFINE BUFFER bAngKopf FOR AngKopf.
COPY-LOB bAngKopf.ank_ObjHandle TO oObj.
objAngebot = CAST(oObj, vk.class.Angebot).