Home » Developer & Programmer » Application Express & MOD_PLSQL » Insert into BLOB (Apex 4.2, Oracle 11g)
Insert into BLOB [message #582925] Tue, 23 April 2013 07:50 Go to next message
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

Re: Insert into BLOB [message #583098 is a reply to message #582925] Thu, 25 April 2013 14:49 Go to previous messageGo to next message
Littlefoot
Messages: 18833
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
All you have to do is to follow the documentation.
Insert into BLOB [message #583426 is a reply to message #582925] Tue, 30 April 2013 13:06 Go to previous message
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.




Previous Topic: The embedded pl/sql gateway versus Apex listener deployed to Glassfish
Next Topic: Turning a table model into a DDL to import into APEX
Goto Forum:
  


Current Time: Sun Apr 20 09:55:03 CDT 2014

Total time taken to generate the page: 0.08784 seconds