To upload a PDF file in BLOB column using Oracle Forms 9i
Can anyone tell me how to upload a PDF file from client system using File dialog window and store its content in BLOB column in a table. The file to be uploaded will be in client side.
Take a look at the following :
Re: Storing a PDF in a BLOB
Re: Retrive Image from DB into Image_item
although the threads above are reffered to images and word doc... the procedure/steps are the same....
Greetings...
Sim
Similar Messages
-
How to Upload a PDF file into BLOB column in a table using Forms 9i
Can anyone tell me how to upload a PDF file from client system using File dialog window and store its content in BLOB column in a table. The file to be uploaded will be in client side.
Hi,
please, search a bit on the forum before do a question:
Just searching by "upload blob pdf" ...
How to batch upload PDF files into database BLOB
Regards,
Jose. -
How to Upload a PDF file into BLOB column in a table using Forms 6i
Can anyone tell me how to upload a PDF file from client and store its content in BLOB column in a table. The file will be genered using reports and win be stored in db.The file to be uploaded will be in client side.
Thank´s.If you are using version 9 or 10 use webutil.... Look in webutil.pll.
Use either one these two fuctions...
FUNCTION Client_To_DB( clientFile in VARCHAR2,
tableName in VARCHAR2,
columnName in VARCHAR2,
whereClause in VARCHAR2,
asynchronous in BOOLEAN default FALSE,
callbackTrigger in VARCHAR2 default NULL) return BOOLEAN;
FUNCTION Client_To_DB_With_Progress
( clientFile in VARCHAR2,
tableName in VARCHAR2,
columnName in VARCHAR2,
whereClause in VARCHAR2,
progressTitle in VARCHAR2,
progressSubTitle in VARCHAR2,
asynchronous in BOOLEAN default FALSE,
callbackTrigger in VARCHAR2 default NULL) return BOOLEAN; -
How to store PDF file in BLOB column without using indirect datastore
Hi ,
I want to store a pdf file in a BLOB column.
But , it should be a direct store. I cannot usre indirect datastore.
BLOB column doesn't support indirect datastore. I get the following error.
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10581: indirect datastores cannot be used with long or lob text columns
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 365
can anyone give me any clue onhow to manage this issue?Thanks This really helped.
For other readers, I am summarising what I did.
create table test
id number primary key,
docs BLOB
create or replace directory doc_loc
as 'c:\test';
CREATE OR REPLACE PROCEDURE Load_BLOB_From_File (file_name in varchar2)
AS
src_loc bfile:= bfilename('DOC_LOC',Load_BLOB_From_File.file_name);
dest_loc BLOB;
begin
insert into tkctsf15t values(1,empty_blob()) returning docs
into dest_loc;
dbms_lob.open(src_loc,DBMS_LOB.LOB_READONLY);
DBMS_LOB.OPEN(dest_loc, DBMS_LOB.LOB_READWRITE);
DBMS_LOB.LOADFROMFILE(
dest_lob => dest_loc
,src_lob => src_loc
,amount => DBMS_LOB.getLength(src_loc));
DBMS_LOB.CLOSE(dest_loc);
DBMS_LOB.CLOSE(src_loc);
COMMIT;
end;
show errors;
exec Load_BLOB_From_File('test.pdf');
exec ctx_ddl.create_preference('mylex','BASIC_LEXER');
create index testx on test(docs) indextype is ctxsys.context
parameters
('filter ctxsys.AUTO_FILTER LEXER mylex ');
select id from test where contains(docs,'patch')>0;
Thanks Roger once more -
Problem in uploading xls/csv file with Email address through oracle forms
Dear all,
I've created an interface to upload data from xls
and csv files to database tables.
I'm sucessed in this. Now i'm facing an issue.
If the xls/csv file having Email address,the
upload activity is not working..junk characters is
getting stored.
I came to know that, xls .csv file having email
address with hiperlink. so this may cause the
issue (just guessing)..
we can't restrict users to upload email without
hiperlink.. so what is the alternative to do
this..
Email address
[email protected]
[email protected]
[email protected]
etc...Can you give some more information:
What versions of Forms, database, Java, browser are you using?
How are you uploading data? Please show us your code.
What do you mean by "email with a hyperlink"? -
How to insert data into BLOB column using sql
Hi all,
How to insert data into BLOB column directly using sql .
create table temp
a blob,
b clob);
SQL> /
Insert into temp values ('32aasdasdsdasdasd4e32','adsfbsdkjf') ;
ERROR at line 1:
ORA-01465: invalid hex number
Please help in this.Thanks,
P Prakashsee this
How to store PDF file in BLOB column without using indirect datastore -
Unale to print pdf files in oracle application server using oracle forms
Hi
We are using oracle developer suite 10g(10.1.2.3.0) in Windows vista. (test environment)
Oracle application server 10g(10.1.2.3.0) in Hp-UX 11iv3 (production environment)
We are able to print pdf files in test environment from oracle forms using the below command:
host('/usr/bin/lp -d p9775hplaser '||'/ashome/output/'||:print_file);
But while declaring to the live environment it is not working
host('cat '||:pdf_print_file||' | acroread -toPostScript | /usr/bin/lp -dp9775hplaser');
but when the above command is put in hp-ux cmd prompt it is workinh"'cat '||:pdf_print_file||' | acroread -toPostScript | /usr/bin/lp -dp9775hplaser'";
Kind ly tell me whether the problem i with the host command and some other command is available for printing files from forms.Here is my guess:
declare
AppID PLS_INTEGER;
begin
AppID := DDE.App_Begin('acroread -toPostScript '||file name,DDE.APP_MODE_MINIMIZED);
end; -
Save Uploaded file in BLOB column of Database
Hey,
Anyone knows how to save uploaded file in BLOB column of database.
Please need help asap.
i get following error:
Cannot convert org.apache.myfaces.trinidadinternal.config.upload.UploadedFiles$FixFilename@1c1fc8d of type class org.apache.myfaces.trinidadinternal.config.upload.UploadedFiles$FixFilename to class oracle.jbo.domain.BlobDomain.
Can anyone tell me what needs to be done.
Thanks,
SnehaHi Timo,
We are using oracle Jdeveloper Studio Edition Version 11.1.1.6.0 . logs are just showing nullpointer exception. Following errors are shown in logs:
<ActionListenerImpl> <processAction> java.lang.NullPointerException
javax.faces.el.EvaluationException: java.lang.NullPointerException
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NullPointerException
at view.bean3.ImageBean.uploadFileValueChangeEvent(ImageBean.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
... 51 more
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.faces.FacesException: #{samplebean2.uploadFileValueChangeEvent}: java.lang.NullPointerException
And one more error i get and i.e.
XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
javax.servlet.ServletException: java.lang.NullPointerException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 36 more
Caused by: java.lang.NullPointerException
at view.bean3.ImageBean.uploadFileValueChangeEvent(ImageBean.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
... 51 more
<Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Attempt to access dead view row of persistent id 17
oracle.jbo.DeadViewRowAccessException: JBO-27102: Attempt to access dead view row of persistent id 17
Can you help me on this one. Any other details you need let me know. -
Problem displaying PDF stored in BLOB column
Hello everyone.
I've been trying to follow this tutorial http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::p11_question_id:232814159006 on displaying PDFs stored in BLOB columns. This is being performed on Apex 4.2, with my DB running 11g. I've got my procedure, which I'll post below:
create or replace procedure "PDF" (p_id IN gvo_documents.doc_id%type)
is
l_lob blob;
l_amt number default 30;
l_off number default 1;
l_raw raw(4096);
begin
select contents into l_lob
from gvo_documents
where doc_id = p_id;
-- make sure to change this for your type!
owa_util.mime_header( 'application/pdf' );
begin
loop
dbms_lob.read( l_lob, l_amt, l_off, l_raw );
htp.prn( utl_raw.cast_to_varchar2( l_raw ) );
l_off := l_off+l_amt;
l_amt := 4096;
end loop;
exception
when no_data_found then
NULL;
end;
end;
I am trying to run this through a PL/SQL dynamic region and while I don't receive any error's, the content displayed is a huge mess of garbled text and odd characters. I've tried to run this procedure on numerous other document types, including word files and jpeg images, all with the necessary changes in my procedure, and regardless of what I use, I still get a large mess of strange characters. Does anyone have any information or ideas about why this is happening?If I understand correctly, your requirements needs to be broken down into two problems:
1) click link that pops up a window displaying a new APEX page
2) an APEX page the displays the document, not downloads it.
I haven't done #1 (yet).
However, you may be able to generate a URL that points to the new page as part of the SELECT statement for the Report.
This has a related question, but no answer yet:
open pdf in popup browser window
The key is target="_blank" for the anchor tag.
To generate the URL, you should use the APEX_UTIL.prepare_URL() function.
If that doesn't work, a Dynamic Action that does some magical JavaScript stuff may be needed.
For #2, I lost the URL that showed how to display a PDF as part of a "form" page.
From what I remember:
Start with a blank page with one blank HTML region (all the Items go in the HTML region)
Add an Item for the PK/Doc_ID
part I forgot Create a Data Manipulation Process
- Automated Row Fetch
- On Load - After Header
- (stuff for your table/view)
part I forgot Create an (I believe) "File Browser" item type. For Settings:
- Storage Type "BLOB column specified in Item Source" (and place the column name of the BLOB there)
- MIME Type Column: (column name) -- since you have multiple types, this is a MUST HAVE
- Filename Column: (column name) -- I highly recommend you have this.
- Content Disposition == INLINE <-- this is the kicker
Also, you will need a Browser Plugin for each of the MIME Types (otherwise, the browser may try to 'download' the file)
Browsers can handle Image types internally. Adobe's plugin can handle PDFs. I don't know about Word/Excel.
Again, I don't remember the exact details, but that should cover most of it.
MK -
Putting a .pdf file into a column in an oracle table
I have created a table with one column as a blob so I can put 4800 .pdf files into that column of a table. Can anyone correct the ways I am trying to do this or let me know of a better way. I have tried several ways and have not been successful. Thanks.
Here are the two ways I have tried that haven't worked.
-- the storage table for the image file
CREATE TABLE pdm (
dname VARCHAR2(30), -- directory name
sname VARCHAR2(30), -- subdirectory name
fname VARCHAR2(30), -- file name
iblob BLOB); -- image file
-- create the procedure to load the file
CREATE OR REPLACE PROCEDURE load_file (
pdname VARCHAR2,
psname VARCHAR2,
pfname VARCHAR2) IS
src_file BFILE;
dst_file BLOB;
lgh_file BINARY_INTEGER;
BEGIN
src_file := bfilename('O:\twilliams\DD_promotion\cards\', pfname);
-- insert a NULL record to lock
INSERT INTO pdm
(dname, sname, fname, iblob)
VALUES
(pdname, psname, pfname, EMPTY_BLOB())
RETURNING iblob INTO dst_file;
-- lock record
SELECT iblob
INTO dst_file
FROM pdm
WHERE dname = pdname
AND sname = psname
AND fname = pfname
FOR UPDATE;
-- open the file
dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
-- determine length
lgh_file := dbms_lob.getlength(src_file);
-- read the file
dbms_lob.loadfromfile(dst_file, src_file, lgh_file);
-- update the blob field
UPDATE pdm
SET iblob = dst_file
WHERE dname = pdname
AND sname = psname
AND fname = pfname;
-- close file
dbms_lob.fileclose(src_file);
END load_file;
This one I get an error message on this statements:(dbms_lob.LOADBLOBFROMFILE(blob_loc,bfile_loc,dbms_l ob.lobmaxsize,bfile_offset,
blob_offset) ; )
DECLARE
bfile_loc BFILE;
blob_loc BLOB;
bfile_offset NUMBER := 1;
blob_offset NUMBER := 1;
tot_len INTEGER;
BEGIN
/*-- First INSERT a row with an empty blob */
INSERT INTO blob_tab VALUES (5, EMPTY_BLOB());
COMMIT;
/*-- SELECT the blob locator FOR UPDATE */
SELECT blob_data INTO blob_loc FROM blob_tab
WHERE id = 5 FOR UPDATE;
/*- Obtain the BFILE locator */
bfile_loc := bfilename('O:\twilliams\DD_promotion\cards\','00EAL.pdf');
/*-- Open the input BFILE */
dbms_lob.fileopen(bfile_loc, dbms_lob.file_readonly);
/*-- Open the BLOB */
dbms_lob.OPEN(blob_loc, dbms_lob.lob_readwrite);
/*-- Populate the blob with the whole bfile data */
dbms_lob.LOADBLOBFROMFILE(blob_loc,bfile_loc,dbms_l ob.lobmaxsize,bfile_offset,
blob_offset) ;
/*-- Obtain length of the populated BLOB */
tot_len := DBMS_LOB.GETLENGTH(blob_loc);
/*-- Close the BLOB */
dbms_lob.close(blob_loc);
/*-- Close the BFILE */
dbms_lob.fileclose(bfile_loc);
COMMIT;
/*-- Display the length of the BLOB */
DBMS_OUTPUT.PUT_LINE('The length of the BLOB after population is: '||
TO_CHAR(tot_len));
END ;
/CREATE TABLE test_blob (
id NUMBER(15)
, file_name VARCHAR2(1000)
, image BLOB
, timestamp DATE
CREATE OR REPLACE DIRECTORY
EXAMPLE_LOB_DIR
AS
'O:\twilliams\DD_promotion\cards\'
CREATE OR REPLACE PROCEDURE Load_BLOB_from_file_image
AS
dest_loc BLOB;
src_loc BFILE := BFILENAME('EXAMPLE_LOB_DIR', '009-1395.pdf');
BEGIN
INSERT INTO test_blob (id, file_name, image, timestamp)
VALUES (1001, '009-1395.pdf', empty_blob(), sysdate)
RETURNING image INTO dest_loc;
DBMS_LOB.OPEN(src_loc, DBMS_LOB.LOB_READONLY);
DBMS_LOB.OPEN(dest_loc, DBMS_LOB.LOB_READWRITE);
DBMS_LOB.LOADFROMFILE(
dest_lob => dest_loc
, src_lob => src_loc
, amount => DBMS_LOB.getLength(src_loc));
DBMS_LOB.CLOSE(dest_loc);
DBMS_LOB.CLOSE(src_loc);
COMMIT;
END;
I am getting this error when I exec load_blob_from_file_image.
ERROR at line 1:
ORA-00972: identifier is too long
ORA-06512: at "SYS.DBMS_LOB", line 716
ORA-06512: at "DRAWING.LOADBLOBFROMFILEIMAGE", line 15
ORA-06512: at line 1
any ideas why? -
Error message when trying to upload a pdf file to a form
A user was trying to upload a pdf file to a form I created (Contractor Vanpool Application Form). The parameters I set, was that it had to be a pdf form, less than 20MB and a single file. She met these parameters, but when she hit the submit button, she received this dialogue box message: Warning: JavaScript Window - File Attachments are not supported in FormsCentral PDF forms. Please contact the form author to send the file attachments another way. This dialogue box prevented her from even getting as far as selecting the file and uploading. Another user was succesfully able to upload a form, so I know this is working. So I changed the parameters to allow multiple files in any format, and she still had a problem.
She states is using windows 95, Internet Explorer. Help, MichelleIn Form Central, when I add a field, I select the Add File Attachment icon (see screen shot below - it is the 10th icon from the left, the paperclip over a sheet):
Then it allows me to fill in the field, describing the file to upload, and the properties to the right defining the file size limit, type of file and other properties. This is all done through formscentral, thus allowing a user in my form to upload a file that is attached to the form when submitted. -
I am trying to upload my PDF file from my iBooks but its only giving me the option to upload from my pictures/gallery. How do I get it so I can upload from my iBooks or move my PDF files to my gallery so I can upload it?
I'm having the same issue. I saved a PDF from an email into iBooks. I'm on apple applying for a job but the only option the upload button has is from the Photos file. How ironic right? Luckily I'm in Logistics and not an IT specialist applying for this job! Lol. Does anyone know the fix?
-
How to read a XML file from BLOB column and insert in a table - PL/SQL Only
Hi,
To make data load more simple to end user instead placing file on the server and use SQL-LOADER, I came up with new idea that using oracle ebusiness suite attachment functionality. that loads a XML file from local PC to a database column(table is fnd_attachments, default data type is BLOB over here).
I tried with DBMS_LOB and didnt get around.
Please can anyone tell me how to read the BLOB column using PL/SQL and store the data in a oracle table. Here's the sample XML file and table structure FYI.
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Corporate_alloc.xsd" generated="2009-07-07T14:17:49">
<Corporate_alloc>
<PKG_CODE>BKCORP</PKG_CODE>
<PKG_NAME>Corporate Edition - Books</PKG_NAME>
<DET_CODE>B9780080543758</DET_CODE>
<DET_NAME>Waves, Tides and Shallow-Water Processes</DET_NAME>
<ALLOCATION_RATIO>0.000041</ALLOCATION_RATIO>
</Corporate_alloc>
<Corporate_alloc>
<PKG_CODE>BKCORP</PKG_CODE>
<PKG_NAME>Corporate Edition - Books</PKG_NAME>
<DET_CODE>B9780080534343</DET_CODE>
<DET_NAME>Hydrostatically Loaded Structures</DET_NAME>
<ALLOCATION_RATIO>0.000127</ALLOCATION_RATIO>
</Corporate_alloc>
</dataroot>
CREATE TABLE TEST_XML
( PKG_CODE VARCHAR2(50),
PKG_NAME VARCHAR2(100),
DET_CODE VARCHAR2(20),
DET_NAME VARCHAR2(500),
ALLOCATION_RATIO NUMBER )
Thanks
EBVIn regards to #3, use the COLUMNS functionality of XMLTable instead of using Extract. Two simple examples are
Re: XML Data - Caliculate fields
Re: Extractvalue function not recognised -
Upload of pdf file from windows server in to DMS content server
dear all,
kindly help me out in uploading the pdf file in DMS content server from windows server. let me know the steps how to complete this task. its a little bit urgent.
thanks in Anticipation
vikram & kiranWelcome to SDN
you can use FM BDS_BUSINESSDOCUMENT_CREATEF to do this
check this thread
Re: convert file details
or this code sample
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de5fb3
Regards
Raja -
How to upload the pdf file to the next view?....urgent
Hi Experts,
I need to upload the pdf file( a interactive form ) using the fileupload element in the A_view and the pdf file can be displayed in the b_view.
But I don't know how to complete the function?
Action:
0. Create a adobe form (c_form)in the R/3 using sfp with a inputfield.
1. Create a adobe interactive form (A_interactive_form)in the view(display_view) of the WDA for abap.
2. Create a context attribute(upload) in the display_view.
3. Bind the c_form to the A_interactive_form, so that the data can be transfered to the c_form.
4. Bind the "pdfSourth" property to context attribute "upload" in the A_interactive_form.
4. Type code in the WDA for abap for setting data("old") to the context.
5. Active the WDA and run the WDA.
6. In the IE, the interactive form is displayed with the value "old" in the field. Save the pdf form as "test.pdf" and close the IE.
7. Open the test.pdf, and type the inputfield "new" in the form, and save the test.pdf.
8. Create a context node(Pdfsourth) in the component controller, and create a attribute("upload") that type is xstring in the Pdfsourth.
9. Create a view(C_view), mapping the context node(Pdfsourth) in the component controller.
10. Create a fileupload element in the C_view, and the "data" property is binded the "upload" attribute in the context node(Pdfsourth).
11. Create a button(Display_form) and create the action with the outplug for upload the pdf file(test.pdf).
12. Change the window and set the C_view as default view, and set the Navigation link from the C_view to B_view.
13. Type code in the wddoinit method in the display_view for transfering the test.pdf file.
method WDDOINIT .
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
DATA upload TYPE xstring.
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->getupload(
IMPORTING
upload = upload " xstring
DATA lo_nd_pdfsourch TYPE REF TO if_wd_context_node.
DATA lo_el_pdfsourch TYPE REF TO if_wd_context_element.
DATA ls_pdfsourch TYPE wd_this->element_pdfsourch.
navigate from <CONTEXT> to <PDFSOURCH> via lead selection
lo_nd_pdfsourch = wd_context->get_child_node( name = wd_this->wdctx_pdfsourch ).
get element via lead selection
lo_el_pdfsourch = lo_nd_pdfsourch->get_element( ).
get single attribute
lo_el_pdfsourch->set_attribute(
EXPORTING
name = `UPLOAD`
value = upload ).
endmethod.
15. Active the WDA and run the WDA.
In the fileupload of the C_view, I select the test.pdf from my local machine. and click the button(Display_form), the display_view is displayed with the A_interactive_form.
But in the A_interactive_form, the value "old" is in the field in the form rather than "new".
I hope to display the test.pdf in the A_interactive_form. I don't know how to change my code or configuration?
Do you give some example or some hint for this problem ?
Thanks & Regards,
TaoNow, The problem has been solved.Thanks a lot.
Maybe you are looking for
-
Help required for Linux installation
Could someone please help me on installing the Java sdk on Suse linux 8? Ive got the rpm but i have no idea how to install it, installing things on linux just boggle me!
-
MMC cannot open the file msisa.msc
Hi, I've been dealing with this problema for a few hours and been searching all over to find no solution to it. I have installed a TMG 2010 SP2 server on a Windows Server 2008 R2 SP1 Server. The installation goes OK, I'm installing first the EMS serv
-
Is there a way to use file path as a template variable?
I'm trying to set up a template that will automatically generate a Google-type "canonical" link, such as <link rel="canonical" href="http://bbrown.spsu.edu/web-lectures/postfix/" /> The server part is a constant; I need to be able to get the path pa
-
IMovie updated quicktime share choppy
I shared an iMOVIE to quicktime last week and it was great (played and looked smooth). I made 2 minor changes, updated to the latest quicktime, shared again and now the movie is very choppy and of lower quality. Can someone help? I DID NOT USE EXPERT
-
LDAP/SSL performance degradation with 1.6.29/1.6.30
Hi, we are running an application within a Tomcat 6.0.35 server on RHEL 5.7/i386 that queries our company's Active Directory using LDAP over SSL. One of the queries involves expanding a large distribution list. Since the upgrade from JDK 1.6.27 to 1.