Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bad runtime function reference error and OLE

Status
Not open for further replies.

maithreyi123

Programmer
Feb 21, 2006
1
BE
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top