dear vinish,
for some reason I have created form and insert data manually which working fine.
I need to save image taken by File Browser manually. I am using ajax call back to insert data into table which is working fine. Please guide me how to insert image along with regular data into table with ajax call back.
Thanks,
Abdul Aqeel Malik
Dear Vinish,
waiting for your early response.
Vinish Kapoor
In Ajax process, get the file blob as shown below:
Then insert it in your table column.
Abdul Aqeel Malik
can you please tell me what is wrong in following code.
declare
mid int;
l_blob blob;
begin
select nvl(max(mid),0)+1 into mid from voucher_mst;
SELECT blob_content
INTO l_blob
FROM apex_application_temp_files
WHERE NAME = :P15_PROOF1;
insert into voucher_mst values(mid,l_blob );
apex_json.open_object;
apex_json.write('mid', mid);
apex_json.close_all;
exception when no_data_found then
raise_application_error(-20111,'Some thing Went wrong');
end;
Try passing the item P15_PROOF1 in the AJEX payload and then use in the select query. This might solve it
https://blogs.ontoorsolutions.com/post/apex-server-process-namespaceserver/
Abdul Aqeel Malik
Dear Ashish Sahay ,
can you please point out where is the problem in codes.
Following Javascript to call ajax callback process.
apex.server.process("bank_payment_mst", {
pageItems: "#P17_DATE,#P17_PROOF1",
x01: $v(P17_DATE),
x02: $v(P17_PROOF1)
},
{
success: function (pData) {
// Codes in Case of Success
apex.item('P17_VNUMBER').setValue(pData.vno);
},
error: function( jqXHR, textStatus, errorThrown ) {
// Codes in Case of Error
}
});
following is ajax callback process.
declare
mid int;
l_proof1 blob;
begin
select nvl(max(mid),0)+1 into mid from voucher_mst;
SELECT blob_content
INTO l_proof1
FROM apex_application_temp_files
WHERE NAME = apex_application.g_x02;
insert into voucher_mst values(mid,apex_application.g_x01,apex_application.g_x02);
apex_json.open_object;
apex_json.write('mid', mid);
apex_json.close_all;
exception when no_data_found then
raise_application_error(-20111,'problem saving ');
end;
following is error in console.
Abdul Aqeel Malik
Dear Vinish,
please guide me about above mention code to complete my form.