maithreyi123
Programmer
I need your help! I am on PB version 8.0.1 build 6028 with Oracle 9i and I
am using an OLE control on a window to allow the user to open a document by fetching the blob from the backend.This works fine for .doc and excel files but i get the runtime error while opening pdf files.
when accessing the objectdata property of the ole control:
Error Number 21
Error text = Bad runtime function reference at line 19 in ue_display_ole event of object dw_1 of w_attachmen_popup.
Please find attached the code for reference :
Long lAttachmentId
Blob blBlob, blTemp
integer result
if al_row= 0 then
Return
end if
lAttachmentId= dw_1.GetItemNumber(al_row, 't_attachment_id')
SELECTBLOB attached_doc
INTO :blBlob
FROM t_attachment
WHERE t_attachment_id= :lAttachmentId ;
SetNull(blTemp)
ole_1.ObjectData= blTemp
ole_1.Visible= True
ole_1.ObjectData= blBlob //Runtime error and application closes.
Thanks in advance.
Regards,
Deva
am using an OLE control on a window to allow the user to open a document by fetching the blob from the backend.This works fine for .doc and excel files but i get the runtime error while opening pdf files.
when accessing the objectdata property of the ole control:
Error Number 21
Error text = Bad runtime function reference at line 19 in ue_display_ole event of object dw_1 of w_attachmen_popup.
Please find attached the code for reference :
Long lAttachmentId
Blob blBlob, blTemp
integer result
if al_row= 0 then
Return
end if
lAttachmentId= dw_1.GetItemNumber(al_row, 't_attachment_id')
SELECTBLOB attached_doc
INTO :blBlob
FROM t_attachment
WHERE t_attachment_id= :lAttachmentId ;
SetNull(blTemp)
ole_1.ObjectData= blTemp
ole_1.Visible= True
ole_1.ObjectData= blBlob //Runtime error and application closes.
Thanks in advance.
Regards,
Deva