Problem with BLOB fields (DBMS_LOB)

I want to read a word document from hard disc and save it into a BLOB field with using DBMS_LOB package. but when using it I always receive error "Invalid LOB locator specified" even I use oracle examples.
I use FormBuilder 6.0.
How can I do this. plz give me a code.
Thanks so much

>
help plzzz
>
If you want help in the forum you need to use English when you post.
You also need to actually ask a question or present the issue that you need help with. Just saying you nave a problem and then posting code isn't sufficient.
Please edit your post and provide the English version of your code, comments, error messages and your action question or issue.

Similar Messages

  • Problem with currency  field in smart form

    hi
    friends ..
    i had problem with currency field in smartform iam printing 5 currecny
    fields after the main window .But not getting printed on right way gets printed down from the given mesaurement and i get lot of gap betwen the
    each fields for ex.
    33,260.00
    120.00
    0.00
    0.00
    0.00
    i thought the the problem is with space .so iwanted to condense it but cannot as it is currency field so move into character fields .but the user want out put in currency format like 22,60.20 if i  get the value in char variable i get 2260.20 which i dont want .
    so pls help me how to condense or shift left and print the currency field on right place.
    regards
    answers will be rewarded points.

    hi,
    this is a normal problem u can avoid this by moveing these currencu value to a character field then print the char field us ing condece... &var(C)&..
    eve if not solve the problem use the TEMPLATE node..
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • Problem with a field set to refresh after insert at Row level

    hello all,
    i have a problem with a field (a serial) which is set by a db trigger at insertion. The field "refresh after insert" is properly set in the Entity and everything is refreshed correctly when i insert data via an adf form in a jspx but when i want to insert programmatically nothing is refreshed. I insert data this way :
    ViewObject insertVO = findViewObject("myView");
    Row newRow = insertVO.createRow();
    newRow.setAttribute("mandatoryAttribute1",value1);
    newRow.setAttribute("mandatoryAttribute2",value2);
    <more init here but not the serial since it will be set by the DB trigger>
    insertVO.insertRow(newRow);
    but when i want to get back the value with "newRow().getAttribute("TheSerial");" i always get a null back and not the value set by the db trigger.
    One way to get the serial is to commit after each insert but i don't want to commit between inserts.
    i've tried to unset the refresh after insert and override the createDef() method to setUseReturningClause(false) as it's is advised in chapter 26.5 of the ADF 4GL dev. guide but in this case i have an exception JBO-29000: JBO-26041.
    How can i get the value back properly ?
    thanks
    -regards

    The data for the newly created row doesn't get inserted into the database until the commit is executed, so the insert trigger isn't called.
    If you need to get the value without committing, then you should implement the trigger programmatically and drop the trigger from the database. The code below shows how you could do this.
    ViewObject insertVO = findViewObject("myView");
    Row newRow = insertVO.createRow();
    SequenceImpl seq = new SequenceImpl("MY_SEQ", insertVO.getDBTransaction());
    Long next = (Long)seq.getData();
    newRow.setAttribute("primaryAttribute", new Number(next));
    ...You will need to replace MY_SEQ and primaryAttribute with the correct values for your example, but this should acheive what you want.

  • Weird Problem with BLOB CMP field

    Hi,
    I am trying to deploy an EJB2.0 CMP Bean in Weblogic6.1 .The Bean has one of the CMP Field as a serializable object mapped to a BLOB Datatype in Oracle8i
    When i try to creae this Entity Bean
    I get "java.io.IOException: ORA-22920: row containing the LOB value is not locked" as a nested exception.
    When i increased the isolation level . I got "java.io.IOException: ORA-01002 fetch out of sequence" as the nested exception
    And one more horrible thing that is happening is the other arguments to the create method are getting updated in the DB except the Blob field(Supposed to rollback? when there is an EJB Exception ??)
    Any thoughts? Comments?
    Regards
    Sathya

    Hi,
    I seem to recall that there are multiple issues with BLOBS & WLS. I'll describe my setup, and you can see if your missing anything:
    - In weblogic-cmp-rdbms-jar.xml you need to set the column type as a Blob:
    <field-map>
    <cmp-field>binary</cmp-field>
    <dbms-column>binary</dbms-column>
    <dbms-column-type>OracleBlob</dbms-column-type>
    </field-map>
    - In weblogic-ejb-jar.xml you may need to set the isolation level of your set method:
    <transaction-isolation>
    <isolation-level>TRANSACTION_READ_COMMITTED_FOR_UPDATE</isolation-level>
    <method>
         <ejb-name>TerminalSoftwareKernelBDO</ejb-name>
         <method-name>setBinary</method-name>
    </method>
    </transaction-isolation>
    - The bean get/set methods should look like this:
    public abstract void setBinary(java.lang.Object binary);
    public abstract java.lang.Object getBinary();
    - In WLS 6.1 up to Service Pack 2 (I don't know about SP3 yet), BLOBs are incorrectly implemented. For some (odd) reason you can only put serialized objects into the DB... I think this means that if you have a BLOB put in by anything but WLS, WLS get very unhappy. So empty out your table with the blobs first.
    Hope that helps.
    Daniel.

  • Error displaying a jpg file loaded into a table with blob field

    This may not be the correct forum for this question, but if it isn't could someone direct me to the correct one.
    I have created a table with a blob field in which I have loaded a jpg image. This appeared to work correctly, but when I try to display the image in internet explorer it comes back and tells me that it doesn't recognize the file type. Enclosed is the table create, load, and display pl/sql code. Can anyone tell me what I am doing wrong. Thanks. For the mime/header I used owa_util.mime_header('images/jpg') because my image is a jpg file.
    The database is 10g
    -- Create table
    create table PHOTOS
    IMAGEID NUMBER(10),
    IMAGE BLOB,
    IMAGE_NAME VARCHAR2(50)
    load image
    CREATE OR REPLACE PROCEDURE load_file ( p_id number, p_photo_name in varchar2) IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := bfilename('SNAPUNCH', p_photo_name);
    -- insert a NULL record to lock
    INSERT INTO photos (imageid, image_name, image)
    VALUES (p_id , p_photo_name, EMPTY_BLOB())
    RETURNING image INTO dst_file;
    -- lock record
    SELECT image
    INTO dst_file
    FROM photos
    WHERE imageid = p_id AND image_name = p_photo_name
    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 photos
    SET image = dst_file
    WHERE imageid = p_id
    AND image_name = p_photo_name;
    -- close file
    dbms_lob.fileclose(src_file);
    END load_file;
    display image
    PROCEDURE display_image(p_id NUMBER) IS
    Photo BLOB;
    v_amt NUMBER DEFAULT 4096;
    v_off NUMBER DEFAULT 1;
    v_raw RAW(4096);
    BEGIN
    -- Get the blob image
    SELECT image
    INTO Photo
    FROM PHOTOS
    WHERE IMAGEID = p_id;
    owa_util.mime_header('images/jpg');
    BEGIN
    LOOP
    -- Read the BLOB
    dbms_lob.READ(Photo, v_amt, v_off, v_raw);
    -- Display image
    htp.prn(utl_raw.cast_to_varchar2(v_raw));
    v_off := v_off + v_amt;
    v_amt := 4096;
    END LOOP;
    dbms_lob.CLOSE(Photo);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    END;
    END;
    The url I enter is: http://webdev:7777/tisinfo/tis.tiss0011.Display_Image?p_id=1

    Just a little more information. When I enter owa_util.mime_header('image/jpeg') I can't display the file. It just shows up with a red x for the file.
    When I enter owa_util.mime_header('image/jpg') it displays the file, but in the format
    ¿¿¿¿JFIF¿¿-Intel(R) JPEG Library, version [2.0.16.48]¿¿C
    This is the way I would expect it to look if I opened it with Notepad, or an application that doesn't recognize jpg files. Can anyone tell me what I am doing wrong?? Thanks.

  • Oracle Rdb Driver 3.1.0.0 problem with blobs

    I am trying to convert an MsAccess application to use an MsAccess front end and an Oracle Rdb back end.
    I've created the test database under VMS and can successfully link to the Oracle Rdb tables from MSAccess 2000. One of the main reasons for converting to Oracle Rdb is to be able to store large word documents in the database. I was able to do that using Oracle rdb Driver v 3.00.02.06. I recently converted to Oracle Rdb Driver version 3.1.0.0 and can no longer access the Blob field containing the Word document. MsAccess now sees this field as type ‘Binary’ and I keep getting an ‘invalid field type’ error. (with 3.00.02.06 this field was seen by MsAccess as an ‘Ole Object’ and the getchunk and appendchunk functions for getting and saving a blob worked reasonably well).
    Is this a bug in 3.1.0.0 or is there some way to get MsAccess to recognize this Binary field type?

    I suspect you'll need to contact Oracle support on this. There aren't, to my knowledge, any RDB folks around here.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Problem with Date fields in Search panel

    Hi all,
    I use TP2 and in my jspx page I have a search panel with two date fields and table where the results is displayed. But there is a problem with these date fields, because when I search dates the results is nothing even I retype the date from table. Also I have other pages where this problem exist with same structure.
    Could somebody help me with some advice?
    Thanks in advance!

    Hi Frank,
    Thanks for the answer.
    I use the standart method to make search panel with drag and drop the data control to the page. The other search panel fileds work fine, only the date fileds are problem. Maybe something in view object doesn't work properly.
    Here I post the code from my page.
    <table border="1" style="margin:5px;">
    <tr>
    <td>
    <af:showDetailHeader text="ТЪРСЕНЕ" disclosed="true"
    inlineStyle="width:780px;">
    <table cellspacing="2" cellpadding="3" border="0">
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.EGN.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.EGN.inputValue}"
    label="#{bindings.EGN.hints.label}"
    columns="#{bindings.EGN.hints.displayWidth}"
    maximumLength="#{bindings.EGN.hints.precision}"
    simple="true"/>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.LNC.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.LNC.inputValue}"
    label="#{bindings.LNC.hints.label}"
    columns="#{bindings.LNC.hints.displayWidth}"
    maximumLength="#{bindings.LNC.hints.precision}"
    simple="true"/>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.AccPersonID.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.AccPersonID.inputValue}"
    label="#{bindings.AccPersonID.hints.label}"
    columns="#{bindings.AccPersonID.hints.displayWidth}"
    maximumLength="#{bindings.AccPersonID.hints.precision}"
    simple="true"/>
    </td>
    </tr>
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.PersonName.hints.label}"/>
    </td>
    <td align="left" colspan="5">
    <af:inputText value="#{bindings.PersonName.inputValue}"
    label="#{bindings.PersonName.hints.label}"
    columns="#{bindings.PersonName.hints.displayWidth}"
    maximumLength="#{bindings.PersonName.hints.precision}"
    simple="true"/>
    </td>
    </tr>
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.DateFrom.hints.label}"/>
    </td>
    <td align="left">
    <af:inputDate value="#{bindings.DateFrom.inputValue}"
    label="#{bindings.DateFrom.hints.label}"
    simple="true">
    <af:convertDateTime pattern="#{bindings.DateFrom.format}"/>
    </af:inputDate>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.DateTo.hints.label}"/>
    </td>
    <td align="left">
    <af:inputDate value="#{bindings.DateTo.inputValue}"
    label="#{bindings.DateTo.hints.label}"
    simple="true">
    <af:convertDateTime pattern="#{bindings.DateTo.format}"/>
    </af:inputDate>
    </td>
    </tr>
    <tr>
    <td align="right">
    <af:commandButton actionListener="{bindings.Execute.execute}"
    text="#{bundle.FindBtn_LABEL}"
    disabled="#{!bindings.Execute.enabled}"
    icon="/images/find.png"/>
    </td>
    <td align="left">
    <af:commandButton text="#{bundle.FindClearBtn_LABEL}"
    icon="/images/find_clear.png"
    action="#{PeopleBean.onClearVCBtn}"/>
    </td>
    </tr>
    </table>
    </af:showDetailHeader>
    </td>
    </tr>
    </table>
    Also I have a result table for the search panel, but I don't believe the problem can be there because it works fine when I search in fields different by inputDate.
    Do you have any suggestions?

  • Problem with Date-Field

    Hi,
    I have a problem with a date-field. Maybe I must describe the problem more detailled, but first I just want to ask you, if you know the following error-message: "21.10.2010 kommt nicht in der Menge der erlaubten Werte vor". I don't know the correct translation but it must be something like this: "21.10.2010 does not occur in the quantity of the permitted values". I don't find the position in the sourcecode of this message. And I know, that this message isn't thrown by a functionblock from SAP. So what is the describtion of this message?

    Yes I have a date field in my form. Ok I must describe it more detailled. I have an employee searchfield. After select an employee you see a form. After filling the form you click on "Send". It creates a ticket and sends the data to the Backend and jumps back to the employee search field. Untill this point everything works fine. There is no problem with the datefield. Now I want to create the form. I choose an employee and fill the form. But now it comes this message. But not after clicking the "send" button. The message comes after changing some data (e.g. change a radio button). So it looks like a validationproblem, but only at the second creationprocess. Maybe the first date is in some cache? I don't know...

  • Migrating a table with BLOB field from SQL-Server to Oracle.

    Hi All,
    I'm trying to create a Class to migrate data from SQL-Server to Oracle, this table has a BLOB field.
    The Code:
    package br.com.infox;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class Migrador {
         public static void main(String[] args){
              try {
                   // Conex�o com o SQL Server
                   Class.forName("net.sourceforge.jtds.jdbc.Driver");
                   Connection conSQL = DriverManager.getConnection ("jdbc:jtds:sqlserver://10.10.2.9/protocolo","prot","suinf2002");
                   // Conex�o com o Oracle
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection conORA = DriverManager.getConnection ("jdbc:oracle:thin:@10.10.2.2:1521:des","protocolo","protocolo");
                   Statement stSQL = conSQL.createStatement();
                   String querySQL = "SELECT * FROM DOC_INCORPORADO";
                   ResultSet rsSQL = stSQL.executeQuery(querySQL);
                   String queryORA = "INSERT INTO PROT_VITALICIAMENTO (NU_PROCESSO, ANO_PROCESSO, CD_USUARIO, DT_ENVIO," +
                             "DE_COMPLEMENTO, NM_ARQUIVO, ARQUIVO, NU_SEQ, CD_TIPO_ARQUIVO, MES, ANO) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
                   PreparedStatement psORA = conORA.prepareStatement(queryORA);
                   while (rsSQL.next()){
                        System.out.println("Linha: " + rsSQL.getRow());
                        psORA.setInt(1, rsSQL.getInt("nu_processo"));
                        psORA.setInt(2, rsSQL.getInt("ano_processo"));
                        psORA.setInt(3, rsSQL.getInt("cd_usuario"));
                        psORA.setDate(4, rsSQL.getDate("dt_incorporacao"));
                        psORA.setString(5, rsSQL.getString("complemento"));
                        psORA.setString(6, rsSQL.getString("nm_arquivo"));
                        psORA.setBinaryStream(7, rsSQL.getBinaryStream("arquivo"), (int)rsSQL.getBlob("arquivo").length());
                        psORA.setInt(8, rsSQL.getInt("num_seq"));
                        psORA.setInt(9, rsSQL.getInt("cd_tipo_arquivo"));
                        psORA.setInt(10, rsSQL.getInt("mes"));
                        psORA.setInt(11, rsSQL.getInt("ano"));
                        psORA.executeUpdate();
                   stSQL.close();
                   psORA.close();
                   conORA.close();
                   conSQL.close();
              } catch (Exception e){
                   e.printStackTrace();
    The ERROR:
    java.sql.SQLException: Exce��o de E/S: Connection reset
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
         at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
         at br.com.infox.Migrador.main(Migrador.java:41)
    What's the problem of these Class?
    Thank's.

    Depending on the version of the database you have, you could use transportable tablespaces.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#9370

  • Smartform: Formatting Problem with QUAN-Field

    I want to print a smartform and get exception 1 (formatting error). With function SSF_READ_ERRORS I get an error table. There is on entry: errnumber = 020011, msgid = SSFCOMPOSER, msgty = E, msgno = 601, msgv1 = wa_outtab-menge.
    It seems to be a formatting problem with field WA_OUTTAB-MENGE. But in the structure this field is referenced correctly.
    Does anybody know a solution?

    I solve this kind of problem in my SmartForm.
    Try this:
    Go to "Global Definitions" Node, then "Current/Quant.Fields" tab and set these values:
    Field Name:      WA_OUTTAB-MENGE
    Reference Field: WA_OUTTAB-MEINS
    Data Type:       QUAN
    Best Regards,
    Eduardo Ribeiro.

  • Problem with decimal fields using BADI For PD Infotypes

    Hi,
    I'm implementing BADI  HRBAS00INFTY.
    For reading the fields of infotype , I'm using the substring
    of the field NEW_INNNN-VDATA .
    I have a problem with fields of type DEC.
    In field NEW_INNNN-VDATA it looks like this :  '####'
    I believe that the possible reason for this is conversion from DEC to CHAR
    But I don't know how to fix it.
    Thank you .
    Message was edited by: Alon Lozinsky

    Hi Alon,
    We had same issue. Use following code.
    data: hri1011_str type hri1011.
    move new_innnn-vdata to hri1011_str.
    HRI1011_STR fields will have decimal values.
    Let me know if you still have any issues. If solution works, kindly do Point Recognition.
    -Bharat

  • Problem with number field

    Hi,
    I'm using ADO (Oracle Provider for OLEDB) to connect Oracle 9. If the type of any field in table is Number(9) and I open query with this field, all negative values are displayed as positive values. For example: If I write -1 value to this field and then post the dataSet (Delphi7 - TADOQuery) value is refreshed to 1. Real value in database is -1.
    Could anybody help me with this problem?
    Regards Jan.

    Once again :)
    I finally foud out that Deplhi does support (varDecimal), but delphi TCustomADODataSet (ADO recordSet wrapper) component incorrecltly treats such field type. It regards Decimal(<9,0) as integer (TIntegerField) but when it gets value from underlying ADO recordset it expects integer variant. So it's delphi problem. I hat to fix this problem in source code of this component.
    Regards Jan.

  • Problem with number-fields in csv-Export-Files

    Hello,
    the export with the csv option works fine and our users like this export-function.
    But Unfortunatelly we have some problems with the exported number fields. In my region I defined the field with a format mask.
    On the screen it looks fine but when I change to csv the values are exported as text-values.
    So in excel the columns are shown with left alignment.
    When I try to change the format in excel to number, excel change the column type but not the value inside.
    On this account we cannot use the sum-function and the display of the value is wrong (alignment).
    Which possibilities do I have to resolve that problem?
    Thanks in advance
    Ulrike

    I have the same issue - Anyone any ideas on how to export currency values in a report to excel as numbers?

  • Problem with BLOB data type and acute characters

    Hi all, I have an issue related with BLOBS cols:
    I have table A with a BLOB column and I need to insert that data into another table B, the thing is I use dbms_lob.read() that returns data into a RAW variable and then I convert it to a varchar2(with utl_raw.cast_to_varchar2) and it works ok if I have no "acute characters" on it, e.g Québec.
    If I have acute characters, the "é" is inserted wrongly with an "¿" character on the table B. I tested the BLOB on the table A to check the data and the BLOB is showing correctly the "é" character, it seems that the dbms_lob.read() funct cannot handle accute characters and replace them with "¿".
    How can I replace acute characters when I use the dbms_lob.read functionality?
    Thank you!

    what's the OS of the db server? is this code an anonymous pl/sql block, or stored pl/sql? does it run on the server or a client? if it's on the client, what's the o/s of the client?
    you might want to look at the following, plus the first 3 notes in it's reference section
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:3038746456038321058::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,264157.1,1,1,1,helvetica

  • Problems with reference field in material type

    Hi,
    I have problem with field reference in material type creation.
    When I define a self-defined field reference ZERS (copy of standard field reference HERS) for a own defined material type ZERS (copy of material type HERS), I get the following error message:
    Field reference ZERS has not been set up
    Message no. CZ127
    Diagnosis
    You have specified a field reference that has not been set up.
    Procedure
    Set up the new field reference or use an already existing field reference.
    I do not understand why because the entry ZERS is present in table T130A.
    Here is the IMG config I have made:
    1. Logistics general->Material Master->Field selection->Maintain field selection for Data Screens (here I made copy of field reference HERS and named it ZERS)
    2. Logistics general->Material Master->Basic Settings->Material types->Define attributes of Material types (here I made a copy of material type HERS and named it ZERS. I then tried to set the field T134-FLREF "Field reference" to ZERS, but then the error message appears)
    Does anyone know what config I am missing?
    Or any reason why the error message CZ127 is coming up?
    Thanks

    Must have been system error, I deleted all entries and did it all over again, it worked.

Maybe you are looking for

  • Closing the browser in InfoView doesn't log the user off.

    In Business Objects XI R2 Infoview, closing the browser in InfoView doesn't log the user off no matter how you answer the subsequent popup question "A window has closed. Log off as well?" Is there a fix for this somewhere?

  • Can I backup two devices to one iCloud account?

    I have an iphone and an ipad using the same user id.  I backup my iphone to icloud, but can I also back up my ipad to the same iCloud account? Nathan

  • How to create business functions and expose as webservice?

    Hi...   How to use Java to create business functions and expose that as a webservice.

  • JSP and JAXB

    DB Structure Parent Table - Incident --> Child Table - IncidentCharges --> Child Table of IncidentCharges --> IncidentChargeWeapons Container Oracle Containers for JAVA(OC4J) We have a schema (Incident.xsd) which comprises of our entire database stru

  • EJB security roles

    Hello, I am using JDeveloper 3.2.2 to deploy EJBs to an 8.1.7 DB. Could someone point me in the direction of some documentation that would explain the concept of security roles and users for EJB methods? Do the users have to map to real users in the