Insert into BLOB [message #582925] |
Tue, 23 April 2013 07:50 |
|
inka
Messages: 14 Registered: February 2013
|
Junior Member |
|
|
Hello All,
I have a form that has an item that displays as a file browse. This item is a BLOB in the database. When I try to insert a record I get this error:
"ORA-01465: invalid hex number"
How can I fix it?
Thanks.
[MERGED by LF]
[Updated on: Tue, 30 April 2013 14:17] by Moderator Report message to a moderator
|
|
|
|
Insert into BLOB [message #583426 is a reply to message #582925] |
Tue, 30 April 2013 13:06 |
|
inka
Messages: 14 Registered: February 2013
|
Junior Member |
|
|
Hello All,
I am running APEX 4.2 and Oracle 11g. I have a form that has an item that displays as a file browse. This item is a BLOB in the database. When I try to insert a record I get this error:
"ORA-01465: invalid hex number"
Here is the insert statement that I run:
"declare
l_document_id number := :P28_DOCUMENT_ID;
l_FILE_BLOB BLOB;
l_MIME_TYPE VARCHAR2(255);
begin
if (:P28_DOCUMENT is not null) then
select mime_type, blob_content
into l_mime_type, l_file_blob
from apex_application_files
where name = :p28_document;
insert into DATABASE_DOCUMENT (
document_id,
database_id,
db_document_type_id,
document_desc,
document_url,
document,
current_flag,
blob_content,
mime_type,
update_date,
update_userid)
values (
DOCUMENT_DOCUMENT_ID_SEQ.nextval,
:P20_DATABASE_ID,
:P28_DOCUMENT_TYPE,
:P28_DOCUMENT_DESC,
:P28_DOCUMENT_URL,
:P28_DOCUMENT,
:P28_CURRENT_FLAG,
L_FILE_BLOB,
L_MIME_TYPE,
sysdate,
lower(:APP_USER)
)
returning document_id into l_document_id;
:P28_document_id := l_document_id;
DELETE FROM APEX_APPLICATION_FILES
WHERE NAME = :P28_DOCUMENT;
END IF;
end;"
How can I fix it?
Thanks.
|
|
|