ultimategc3
Programmer
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 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
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 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