Upload blob content

Hi all,
I am facing an issue, while inserting blob content into database.
I am having a table(table1) with following column cat(char) PK,upload blob,mimetype varchar(1000),filetype varchar(1000)
For inserting values into DB(table1) i am using the following process, here it works fine
BEGIN
IF (:P9_X IS NOT NULL)
THEN
INSERT INTO table1(cat,UPLOAD,MIMETYPE,FILETYPE)
SELECT :p9_cat,blob_content,MIME_TYPE,FILE_TYPE FROM wwv_flow_files where name=:P9_X;
END IF;
END;
But, when i tried to have ID(number PK) in table1 with above process, i am not able to insert values. While creating process it throws following error.
INSERT INTO table1(ID,UPLOAD,MIMETYPE,FILETYPE)
SELECT DEL_SEQ.NEXTVAL,blob_content,MIME_TYPE,FILE_TYPE FROM wwv_flow_files where name=:P9_X;
ORA-06550: line 6, column 24: PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got BLOB ORA-06550: line 5, column 7: PL/SQL: SQL Statement ignored
Thanks.

Hi,
If I understand correctly, your table UPLOAD column format is number and you try insert BLOB to it.
Regards,
Jari

Similar Messages

  • Uploaded blobs are not moving to RBS storage even RBS is enabled for this content db

    Hi
    In a production environment RBS  is configured for SharePoint content dbs ,
    and sql server  has failover clusters and alwayson
    Now each content db  size is very huge : mdf file : 617 GB and .ndf file292 GB
    and  RBS Storage is :  4,742,795 Files, 117 Folders  and size is 1.35 TB (1,494,447,389,036 bytes)
    and web application content organizer is enabled and
    daily many users upload documents to this web application
    here my issue is when user upload documents  these docs are saving in content db, but no count of files increased in RBS
    storage
    when I run below two queries
    Selectcount(*)fromAllDocstreamswhereRBSIDIS 
    NOTNULL
    its showing every time( 417 7813 ) its not changing every time I run the  query
    Selectcount(*)fromAllDocstreamswhereRBSIDIS  
    NULL
    when I run this query  the  count of files are  increasing every time
    count of files now is149 239 and  its keep increasing   when I run  query  bcz users are uploading docs.
    here I want to know why these  uploaded blobs are not moving to RBS storage even rbs is enabled for this content db
    ;what is the reason
    adil

    yes its working for me If I run following commands
    $cdb = Get-SPContentDatabase Original_Wss_Content_MSRBS
    $rbss = $cdb.RemoteBlobStorageSettings
    $rbss.GetProviderNames()
    $rbss.Installed()
    I don't know what happen , why blobs not going to rbs storage ,
    before two months ago I work with other company they installed migration jobs for migrate  blobs to nas storage, but they targeted to one content database only
    adil

  • Iframe of a Blob Content in Apex form/report

    Hi All
    I am developing a application where users will upload documents which will be stored in blob column. Now the requirement is to show the document with in the page using Iframe. Can some one please suggest the steps to show the blob content in iframe.
    Thanks in Advance.
    regards
    Srini.

    You can show the documents in an iframe only if your browser has an appropriate plugin (like to most browsers have it for pdf documents). Otherwise you will be forced to either save the document or open it with the appropriate programm. Means, your application will probably fail to show the documents in an iframe for all other document types other than pdf.
    I have no special case explaining how to display a document in an iframe but you can inspect it here:
    http://apex.oracle.com/pls/apex/f?p=31517:15
    and
    http://apex.oracle.com/pls/apex/f?p=31517:58
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to upload BLOB

    hi phil,
    i need to upload BLOB can u please get me sample code?

    Hi,
    who's Phil ? Anyway, which technology and what content ?
    Frank

  • Downloading blob content from a custom table

    In our hosted Apex application, the following code from the Application Express Developer's Guide works great for allowing a user to download blob content from one of our custom tables via a download button. However, the code doesn't work on the Oracle Cloud because the "owa_util" package is no longer available. The code is as follows:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM file_subjects
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    end download_my_file;
    Besides using web services, does anyone know of a way to do this? Is there a way to add access to the "owa_util" package in the cloud? I have also tried apex_util.get_blob_file_src but that is also unavailable in the Oracle Cloud.
    Thanks,
    Steve

    Following Joel's advice:
    The way I solved this was to split the code between two page processes and one application process. The download button first calls a page process to move the report data into a blob column and then calls another page process which is of "run application process" type. This calls the application level process where the download code, shown below, is called.
    Notice the following changes to the code from the one posted earlier (also from Joel)
    1) added sys.htp.init;
    2) "sys." to all htp, owa and wpg_docload calls
    3) added apex_application.stop_apex_engine; after the wpg_docload statement at the bottom of the script.
    Now the download button launches a "save as" dialog box and the report content is downloaded to the client.
    The code now looks like:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM oehr_file_subject
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    sys.htp.init;
    sys.owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    sys.htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    sys. htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    sys.owa_util.http_header_close;
    -- download the BLOB
    sys.wpg_docload.download_file( Lob_loc );
    apex_application.stop_apex_engine;
    end download_my_file;
    Thanks Joel for your help.
    Steve

  • Permission issue uploading old content

    I have an old onsite adobe connect server that I have content on..  iam trying to upload the content to a new server but keep getting error that the process cannot be completed.   adobe support said that the zip file iam trying to upload contains a file with  permissions from the old server and that is why I cannot upload to new server..
    my question is which file contains this permissions and how do I strip  it out..   iam able to take all kinds of content from the old server and upload to new server with no issues..  only a few of the zip files are giving me this error..
    here is adobe supports explanation..
    We would like to inform you that we have check the file which you have send to us through our resource team. we would like to inform you that zip file contains the content from your local server, which you are unable to upload to hosted account because it might give you permission error.

    Hi,
    Regarding your udml query, you can follow the below steps ,
    1.Right click the subject area in your presentation layer and select copy(ctrl+c)
    2.Open a text editor and paste the udml, do find and replace,
    Find - PRIVILEGES ( NONE)
    Replace- PRIVILEGES ( READ)
    *with the assumption that Read permission has to be granted to all presentation objects.
    3.Delete the subject area from presentation layer and copy the entire content from your text editor (in step 3)
    4.Right click your presentation layer and select paste.
    5.Now validate the permission by clicking on Permissions on the presentation object.
    Let me know if this solves the issue.
    Rgds,
    Dpka
    Edited by: Dpka on Aug 24, 2011 3:23 PM

  • Display blob content as pdf file

    Dear Expert,
    Currently i'm using oracle apex 3.0.1.
    I'm having a problem on displaying blob content (from database table) as pdf file on oracle application express but i'm able to save to download the pdf.
    Below is the procedure that i used to display blob content,
    PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    begin
    selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
    into lob_loc,l_length
    from ord_img
    where oi_tno= pv_image
    and oi_ti='PDF'
    and oi_idx=pv_index;
    exception
    when others then
    null;
    end;
    OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
    HTP.p ('Content-length: ' || l_length);
    OWA_UTIL.http_header_close;
    WPG_DOCLOAD.download_file (lob_loc);
    END lf_html_pdf;
    I get the error message as below when i execute the procedure above;
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    *06502. 00000 - "PL/SQL: numeric or value error%s"*
    I'm appreciated if expert can have me on the problem above?
    Thanks
    From junior

    *Always post code wrapped in <a href=http://wikis.sun.com/display/Forums/Forums+FAQ#ForumsFAQ-Arethereanyusefulformattingoptionsnotshownonthesidebar?"><tt>\...\</tt> tags</a>:*
      PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
         l_mime        VARCHAR2 (255);
         l_length      NUMBER;
         l_file_name   VARCHAR2 (2000);
         lob_loc       BLOB;
      BEGIN
          begin
            selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
            into lob_loc,l_length
            from ord_img
            where  oi_tno= pv_image
              and oi_ti='PDF'
              and oi_idx=pv_index;
          exception
                when others then
                null;
            end;
         OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
         HTP.p ('Content-length: ' || l_length);
         OWA_UTIL.http_header_close;
         WPG_DOCLOAD.download_file (lob_loc);
      END lf_html_pdf; Start by getting rid of:
          exception
                when others then
                null;and never using it anywhere ever again.
    If you're not actually going to use the <tt>l_mime</tt> and <tt>l_file_name</tt> variables then remove these as well. (Although I really think you should set a filename.)
    >
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    06502. 00000 - "PL/SQL: numeric or value error%s"
    >
    The error stack indicates that the exception is being raised in <tt>HCLABPRO.PKG_PDF</tt>: what is <tt>HCLABPRO.PKG_PDF</tt>? Does this actually have anything to do with the procedure above?
    I get the error message as below when i execute the procedure above;How do you execute it?
    What happens when it's executed without the <tt>when others...</tt> built-in bug?

  • Diaplay BLOB content (jpeg picture) in XML Publisher 5.6.3

    Hi Gurus,
    I am trying to include BLOB content (jpeg picture) in my RTF template.
    But the pdf output giving blank page.
    I am using following syntax in my picture form field.
    <fo:instream-foreign-object content-type="image/jpg" width="251.8pt"
    height="174.3pt">
    <xsl:value-of select="FILE_DATA"/>
    </fo:instream-foreign-object>
    Can you please correct me where I am doing wrong..?
    Many Thanks..!

    Hello Friends,
    Can anyone help me to resolve this issue please..!
    Below is the error from OPP service log.
    [6/14/10 3:33:34 PM] [UNEXPECTED] [54042:RT1236433] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.charAt(String.java:687)
         at oracle.apps.xdo.common.encoding.Base64Util.decode(Base64Util.java:54)
         at oracle.apps.xdo.template.fo.elements.FOInstreamForeignObject.end(FOInstreamForeignObject.java:71)
         at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:455)
         at oracle.apps.xdo.common.xml.XSLTHandler$EEEntry.sendEvent(XSLTHandler.java:594)
         at oracle.apps.xdo.common.xml.XSLTMerger.startElement(XSLTMerger.java:51)
         at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:206)
         at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:320)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1051)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:296)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:173)
    [6/14/10 3:33:34 PM] [54042:RT1236433] Completed post-processing actions for request 1236433.
    Many Thanks..!

  • Zip file upload to content area

    Has anyone tried zipping up a huge folder on the filesystem, say around a 100 files and uploaded the zip to a content ara folder? I could successfully upload the zip file but and then used the unzip link next to the uploaded content. It unzips as well, but when I click on the folder to view the unzipped files, before it could show me the 100 odd files, the server times out. I believe it is due to the number of files in a single folder. If I do the same thing with a hierarchy of folders and sub-folders containing only 10s' of files it works and displays the page to me with all links working.
    I hope you must have tried this, and pls. help me and provide me an alternative.

    check out this OSS Note No. 925327
    <a href="http://service.sap.com/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=925327">HTTP error: 411 Length Required in upload to content server</a>
    Regards
    Raja

  • How to upload blob from forms6i

    Hi,
    Anyone has idea how to upload blob
    using forms6i ?????
    Mehul

    Hi,
    Set-AzureStorageBlobContent copies a file from the host it is run on to Azure Blob Storage. Running this cmdlet on your local machine means it will copy files from your local machine to Azure Blob Storage. Running this cmdlet in a runbook means it will copy
    files from the sandbox running the runbook to Azure Blob Storage. Runbooks have no access to your local machine, since they run in Azure.
    If you want to interact with files on your local machine from within runbooks, you need to put the local files into Blob Storage, and then download them from Blob Storage within the runbook.
    Here's an example of PowerShell you could put in a runbook to download files from Blob Storage:
    $AzureConnectionName = "SomeAzureConnectionAssetName"
    $TempFileLocation = "C:\abc.cscfg"
    $StorageAccountName = "MyStorageAccount"
    $ContainerName = "MyContainer"
    $BlobName = "MyDeploymentConfig.cscfg"
    Connect-Azure -AzureConnectionName $AzureConnectionName
    InlineScript {
    Select-AzureSubscription -SubscriptionName $Using:AzureConnectionName
    $StorageAccount = (Get-AzureStorageAccount -StorageAccountName $Using:StorageAccountName).Label
    Set-AzureSubscription `
    -SubscriptionName $Using:AzureConnectionName `
    -CurrentStorageAccount $StorageAccount
    $blob =
    Get-AzureStorageBlobContent `
    -Blob $Using:BlobName `
    -Container $Using:ContainerName `
    -Destination $Using:TempFileLocation `
    -Force

  • Mass upload of contents in KM using WEBDAV

    hi all,
    plz do help me out with mass upload of contents in KM using WEBDAV .
    its urgent

    hi shailesh,
    1.If you want to transfer documents to KM,go to the folder "/documents",open its Detail dialog box.
    2.Go to Settings->Properties.Click on 'Access Links' tab.
    3.Copy the WebDAV url and paste it in your browser.Open your KM Folder as a Web Folder after authentication for your credentials is done.
    4.Copy the folders from your file system to the server just as you would copy folders in Windows File System.
    Also transfering of contents using WebDav only transfers the content,metadata is lost in the process
    Hope it helps,
    Srinath

  • Send Blob Contents to Client machine as Attachment

    I am able to see the blob contents in the client window but the file does not show as attachment which is my main purpose-- to give the user the option either to open the file or to save the file on his machine. I am also setting the setHeader as attachment , but nothing happens....and sometimes it shows a dialog box to open my jsp file itself rather than the desired file... sending you the code ..please help
    File file1 = new File("c:\\Test.java");
    byte[] buffer = new byte[(int)file1.length()];
    BufferedInputStream is = new BufferedInputStream(new FileInputStream(file1));
    is.read(buffer, 0, (int)file1.length());
    is.close();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    baos.write(buffer, 0, (int)file1.length());
    System.out.println(baos.toString());
    byte[] pass = baos.toByteArray();
    response.setHeader("Content-Desposition", "attachment;filename=untitled.java");
    response.setContentType("application/octet-stream");
    //Send content to Browser
    ServletOutputStream servletOut = response.getOutputStream();
    servletOut.write(pass);
    servletOut.close();

    It works,
    you have a type!
    response.setHeader("Content-Desposition", "attachment;filename=untitled.java");
    It should be "Content-Disposition" not "Content-Desposition"
    try it out.
    cheers

  • Regarding mass upload of contents in KM using WEBDAV

    hi all,
    plz do help me out with mass upload of contents in KM using WEBDAV .
    its urgent

    Hi,
    check this out.
    http://help.sap.com/saphelp_nw70/helpdata/en/42/e6753939033ee5e10000000a1553f7/frameset.htm
    You can install an application an upload files and folders.
    Regards
    Ismail

  • Possible to take a blob content out of table

    Hi,
    i have a table in which the image is getting storing in the table in blob content.
    Whether it is possible to copy that image which is stored in the table to outside, so that i can edit the photo in paint.
    It is possible to take that blobcontent of the image out of the table.
    If so, how to achieve it.
    Regards,
    Saro.

    Hi Saubhik,
    Thanks for the reply, but i get the following error while compiling the code after altered to my requirement.
    DECLARE
    b             BLOB;
    file_handle   UTL_FILE.FILE_TYPE;
    file_dir      varchar2(100) := '\ebiz1\proddb\apeximages';
    l_blob_len    INTEGER;
    BEGIN
    SELECT   blob_content
    INTO   b
    FROM   a_images2
    WHERE   employee_number = '048';
    file_handle := UTL_FILE.FOPEN (file_dir, 'prasad.png', 'wb')
    l_blob_len := DBMS_LOB.getlength (b);
    UTL_FILE.FCLOSE (file_handle);
    end;This is the error message
    ORA-29280: invalid directory path
    ORA-06512: at "SYS.UTL_FILE", line 41
    ORA-06512: at "SYS.UTL_FILE", line 478
    ORA-06512: at line 15
    Since i have referred the oracle path only, then also it is throwing the error.
    Thanks
    Saro

  • Discoverer portlet error: blob content is empty.

    I created 6 disco reports and some are giving error, Failed to retrieve an entry from the cache in the Discoverer Portlet Repository. The BLOB content is empty.
    This error only happens with certain users. The users can log directly into discoveer viewer and see the reports. Just not in portal. It also gives me this error randomly and I have to delete the portlet and recreate it. Has anyone else experienced this problem.
    BH

    I copied and pasted the above code to my jsp. It works fine for me . I get the content correctly. Tried on a ps 7.1
    hope the additional character "/>" is not intended
    <td>city</td><td><input name="city"value="city"/>/></td>

Maybe you are looking for