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 SkipVought 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

Status
Not open for further replies.

ultimategc3

Programmer
Oct 18, 2010
14
0
0
EG
Dear friends,

I've a problem assigning the blob data to the ole objectdata, this error is usually appears(R0021) Example below:

// inserting a file into an ole control
if ib_notsaved then
li_rc = Messagebox("Save Changes","Do you want to Save the Attachment",Question!,YESNOCANCEL!)
if li_rc = 1 then li_rc = 1
if li_rc = -1 or li_rc = 3 then Return
end if
ls_exten = "PDF"
ls_filter = "Adobe PDF Files (*.PDF),*.pdf"
GetFileOpenName("Select File",ls_path,ls_filename,ls_exten,ls_filter)

// Saving the file into the DB
lb_object = ole_1.objectdata

sqlca.autocommit = TRUE
updateblob table_name set blob_col = :lb_object
where
col_1 = :var_1
using
sqlca;

// Retrieving the file
blob ole_blob
selectblob tab_name.blob_col into :eek:le_blob from tab_name
where
col_1 = :var_1;
ole_1.objectdata = ole_blob // Problem exists here
================================================================================

Please Advice me if there is any other technique or any solution

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top