Caching LOB Fields

Using OCI, I'm working on a C++ class that will (hopefully) give me the ability to create a scrollable result set of records.
The caching of most datatypes VARCHAR2, CHAR, NUMBER, DATE etc is quite straight forward. I simply convert the values to strings and store them away in the row cache.
However, I have an issue with LOB fields. I obviously don't want to store the whole LOB field in the cache. Instead I want to just store away enough information to enable access to the original LOB when required. I am thinking about storing away the LOB index at the moment. Is this the way to do it or is there a better method.
TIA
Adrian
LBS Limited, UK
www.lbs-ltd.com

Sorry, I really meant the LOB Locator (OCILOBLocator) not the LOB Index.
This can then be used for the OCIReadLOB function.
Am I right ?
Adrian

Similar Messages

  • JPA - lazy loading for LOB field

    Hi all,
    JPA 1.0 specification mandates that all JPA-compliant implementation support lazy loading for certain kind of entity field.
    For LOB fields lazy loading is OPTIONAL.
    I am experiencing odd runtime behaviors on my custom software which would point to this feature not being supported.
    Can anyone please tell me if SAP JPA 1.0 implementation on NW CE 711 implements this feature or not?
    Thanks in advance
    Regards
    Vincenzo

    Hi Vincenco,
    I am sure that this is the same as with single-valued relationships (@OneToOne, @ManyToOne): Lazy loading would require bytecode manipulation/generation, so SAP JPA does not support it in 7.20 (and of course not in 7.11)
    See tulsi jiddimani's elaborate answer here: Re: JPA: Documentation on LazyLoad.
    In 7.30 enhancements, you really can find lazy loading support for single-valued relationships with getReference.
    http://help.sap.com/saphelp_nw73/helpdata/en/68/f676ef36094f4381467a308a98fd2a/content.htm
    but @Lob and @Basic is not mentioned.
    If you need lazy loading in 7.11, you have two alternatives:
    1. Put the Lob fields into separate entities, work around the missing feature in SAP JPA with ugly @OneToMany - Relations
    2. Use another persistence provider like EclipseLink, read Sabine Heider's blogs about integrattion of EclipseLink in SAP NetWeaver and static bytecode weaving for lazy loading. /people/sabine.heider/blog
    Regards
    Rolf

  • LOB fields and group

    Hello all!...
    if I have a TABLE(FunctionName())'s dataset, where it returns three fields which they are a NUMBER, a VARCHAR and a BLOB, and a table TBL01 and I create a view LIKE:
    CREATE OR REPLACE VIEW vw_detail
    rs.ID,
    rs.DESCRIPTION,
    rs.DOCUMENT,
    TBL01.AUTHOR,
    TBL01.DATE_CREATION
    AS
    SELECT
    FROM
    TABLE(FunctionName()) rs
    JOIN TBL01 ON
    (TBL01.FK_RS = rs.ID)
    GROUP BY
    rs.ID,
    rs.DESCRIPTION,
    rs.DOCUMENT,
    TBL01.AUTHOR,
    TBL01.DATE_CREATION
    ORDER BY rs.ID DESC;
    why it returns me this following error?
    ORA-00932: inconsistent datatypes: expected -, got BLOB
    I would create that view so in the next step I'd SELECT directly the VIEW to obtain whatever I want...uhm maybe is there a different way to implement this CREATE VIEW?....

    You could perhaps try something in this style... +(untested)+
    CREATE OR REPLACE VIEW vw_detail (FIELD1,FIELD2,FIELD3,FIELD4,FIELD5) AS
      WITH rs AS (SELECT * FROM TABLE(FunctionName()))
      SELECT rs.ID,
             rs.DESCRIPTION,
             rs.DOCUMENT,
             TBL01.AUTHOR,
      FROM   rs
             JOIN TBL01 ON (TBL01.FK_RS = rs.ID)
      WHERE  (rs.ID,rs.DESCRIPTION,TBL01.AUTHOR,TBL1.DATE_CREATION) =
                                          (SELECT rs.ID
                                                  rs.DESCRIPTION,
                                                  TBL01.AUTHOR,
                                                , MAX(DATE_CREATION)
                                           FROM   TBL01
                                                  JOIN rs ON (TBL01.FK_RS = rs.ID)
                                           GROUP BY
                                                  rs.ID,
                                                  rs.DESCRIPTION,
                                                  TBL01.AUTHOR,
      ORDER BY rs.ID DESC;Edited by: BluShadow on Sep 5, 2008 9:14 AM

  • Why can I cache method & field ids but not class?

    In my efforts to understand JNI, I've been making heavy use of http://java.sun.com/docs/books/jni/.
    I'm having trouble reconciling some of the points it makes with regard to caching; in particular, section 4.4.1 has an example of caching a jmethodID in MyNewString().
    I don't understand why this is valid, but the example in 5.5.1 which caches the jclass is invalid.
    After all, these are both simply jobjects in the end, and isn't the jmethodID cached in 4.4.1 based off the jclass found the first time? Doesn't that become invalid when the jclass becomes invalid?
    Thanks,
    : jay

    The point the author of that book is trying to make is that caching JNI local references of such data like Java method IDs and classes is not valid across successive JNI calls. If you want to cache something the first time you load it and reuse it later, create a global reference via NewGlobalRef(), make this your cached variable, and delete the local reference automatically obtained from the JVM when you first asked for that something. Then you can refer to that cached variable all you want.
    Also beware of trying to use references across threads - this is illegal in JNI. (You might want to reread chatper 5 for this and more. My opinion is the book "Essential JNI" is a bit better though not up to date either.)
    - Chris

  • The size limit of the OCI LOB Array Insert is 64K for one field?

    I have a table with 4 field, and one is BLOB field. I want to insert 16 rows in one OCIStmtExecute. I know I can specify the iter parameter with 16 to execute sql 16 times.
    I found example in "Application Developer's Guide - Large Objects" in page "Data Interface for Persistent LOBs 13-17", there is a example function called "array_insert". It shows the usage of OCIBindArrayOfStruct, but can only insert LOB with same size, the LOB field of each row filled with the same size data.
    But I have to insert LOB with different size, for example 8K for row 1, and 16K for row 2, 128K for row 3. Than I find the alenp parameter of OCIBindByName/OCIBindByPos. It is "pointer to array of actual lengths of array elements."(OCI document). So I think I find the solution for my problem. But the type of alenp parameter is ub2*, is it means I can only insert 64K data for each row in my array insert? It is too small, I hope I can array insert BLOB with 16M each row.
    Or there is any other solution for my problem? I look forward to it for a long time! thanks every one!

    It is called Data Interface to work with LOB datatypes by APIs designed for use with legacy datatypes. I can specify SQLT_BIN to bind memory binary data to BLOB column, and INSERT or UPDATE directly. It can be without LOB locator and save round-trip to the server. This is very fit my needs, because I have to insert very much BLOBs to server as soon as possible.
    I have make a test program, and multi-row with different size blob( less than 65536 bytes) can be insert at one time, without locators. Multi-row wiht same size blob( more than 64K) also can be insert at one time--the alenp parameter is not used. I only can not insert multi-row with different size blob( more than 64k) because the type of alenp is ub2*.
    thank you for your reply!

  • Making a dynamically generated field as Read Only

    Hi All,
    I am extending a standard CO and in that I wanted to make an entire table as read only. I checked by personalizing the page from front end, but as the items are dynamically generated fields , they are not visible in personalize page.
    So is there any way to cach these fields and make them read only programmatically.
    Thanks,
    Srikanth

    Hi Pratap,
    I have looked into the view source and took the name of a input type ( There is no ID for the field) and used it in findIndexedChild, but it returns a null. I guess this is happening is the current CO is a mere region level CO and it is not being given the access.
    The code in the class file is as follows :
    public static void processTable(OAPageContext oapagecontext, OAWebBean oawebbean)
    oapagecontext.startTimedProcedure("CrossTableCO", "processTable");
    String s = null;
    String s1 = null;
    int i = oawebbean.getIndexedChildCount();
    String as[[][]] = new String[7];
    int j = 0;
    String as1[[][]] = new String[i][6];
    for(int k = 0; k < oawebbean.getIndexedChildCount(); k++)
    UINode uinode = oawebbean.getIndexedChild(k);
    if(!(uinode instanceof OAMessageStyledTextBean))
    continue;
    OAMessageStyledTextBean oamessagestyledtextbean = (OAMessageStyledTextBean)uinode;
    if(oamessagestyledtextbean.isRendered())
    oamessagestyledtextbean.setRendered(false);
    oamessagestyledtextbean.setAttributeValue("benCustomBeanRender", "Y");
    if("TotalPlanLabel".equals(oamessagestyledtextbean.getUINodeName()))
    s1 = oamessagestyledtextbean.getLabel();
    continue;
    if(s == null)
    s = oamessagestyledtextbean.getViewUsageName();
    as[j][0] = oamessagestyledtextbean.getViewAttributeName();
    as[j][1] = oamessagestyledtextbean.getSortByAttributeName();
    as[j][2] = oamessagestyledtextbean.getLabel();
    as[j][3] = oamessagestyledtextbean.getExportByViewAttrName();
    as[j][4] = oamessagestyledtextbean.getDestination();
    as[j][5] = oamessagestyledtextbean.getUINodeName();
    as[j][6] = oamessagestyledtextbean.getDataType();
    if(as[j][4] != null && as[j][5] != null)
    as1[j][0] = as[j][5];
    as1[j][1] = as[j][0];
    as1[j][2] = s;
    as1[j][3] = as[j][4];
    as1[j][4] = as[j][6];
    as1[j][5] = as[j][3];
    j++;
    continue;
    if("TotalPlanLabel".equals(oamessagestyledtextbean.getUINodeName()))
    s1 = "XXHideXXTotalXX";
    oawebbean.setAttributeValue("CrossTableUpdateInfo", as1);
    oawebbean.setAttributeValue("CrossTableRenderCount", Convert.getString(j));
    if(s == null)
    return;
    OAViewObject oaviewobject = (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject(s);
    if(oaviewobject == null || !oaviewobject.isPreparedForExecution() || oaviewobject.first() == null)
    return;
    } else
    oawebbean.addIndexedChild(createTable(oawebbean, oaviewobject, as, j, s1));
    oawebbean.setAttributeValue("CrossTableRowCount", Convert.getString(oaviewobject.getRowCountInRange()));
    oapagecontext.endTimedProcedure("CrossTableCO", "processTable");
    return;
    private static UINode createTable(OAWebBean oawebbean, OAViewObject oaviewobject, String as[][], int i, String s)
    int j = oaviewobject.getRowCountInRange();
    DataTextNode datatextnode = new DataTextNode(new DataBoundValue("text"));
    String as1[] = new String[j + 1];
    CrossTableData acrosstabledata[] = new CrossTableData[i];
    int k = -1;
    for(int l = 0; l < i; l++)
    acrosstabledata[l] = new CrossTableData(new CrossTableCellData[j + 1]);
    for(int i1 = 0; i1 <= j; i1++)
    if(i1 > 0)
    try
    if(s != null && j > 1 && CT_NUM_MINUS_ONE.equals(oaviewobject.getRowAtRangeIndex(i1 - 1).getAttribute("GroupOiplId")))
    as1[i1] = s;
    else
    as1[i1] = (String)oaviewobject.getRowAtRangeIndex(i1 - 1).getAttribute("Name");
    catch(Exception exception)
    datatextnode = null;
    as1[i1] = "";
    if(k < 0 && j > 1 && "XXHideXXTotalXX".equals(s) && CT_NUM_MINUS_ONE.equals(oaviewobject.getRowAtRangeIndex(i1 - 1).getAttribute("GroupOiplId")))
    k = i1;
    for(int j1 = 0; j1 < i; j1++)
    if(i1 == 0)
    acrosstabledata[j1].getData()[i1] = new CrossTableCellData(as[j1][2]);
    else
    acrosstabledata[j1].getData()[i1] = new CrossTableCellData(null, as[j1][2], oaviewobject, i1 - 1, as[j1][0], as[j1][1], as[j1][3], as[j1][4], as[j1][5], as[j1][6]);
    TableBean tablebean = new TableBean("CrossTable", new ArrayDataSet(acrosstabledata), null, null, datatextnode, new ArrayDataSet(as1, "text"));
    tablebean.setWidth("100%");
    tablebean.setSummary(" ");
    tablebean.setNameTransformed(false);
    tablebean.setTableFormat(new DictionaryData("tableBanding", "rowBanding"));
    tablebean.setID((new StringBuilder()).append("CrossTable").append(oawebbean.getID()).toString());
    oawebbean.setAttributeValue("CrossTableId", tablebean.getID());
    DictionaryData adictionarydata[] = new DictionaryData[j + 1];
    Object obj = null;
    Object obj1 = null;
    for(int k1 = 0; k1 <= j; k1++)
    OAWebBean oawebbean1 = createColumn(k1);
    if(k1 == k)
    oawebbean1.setRendered(false);
    tablebean.addIndexedChild(oawebbean1);
    if(k1 == 0)
    adictionarydata[k1] = new DictionaryData("columnDataFormat", "textFormat");
    continue;
    try
    String s1 = (String)oaviewobject.getRowAtRangeIndex(k1 - 1).getAttribute("TextFormat");
    if("Y".equalsIgnoreCase(s1))
    adictionarydata[k1] = new DictionaryData("columnDataFormat", "textFormat");
    else
    adictionarydata[k1] = new DictionaryData("columnDataFormat", "numberFormat");
    catch(Exception exception1)
    adictionarydata[k1] = new DictionaryData("columnDataFormat", "numberFormat");
    tablebean.setColumnFormats(new ArrayDataSet(adictionarydata));
    return tablebean;
    private static OAWebBean createColumn(int i)
    OAFlowLayoutBean oaflowlayoutbean = new OAFlowLayoutBean();
    OAMessageTextInputBean oamessagetextinputbean = new OAMessageTextInputBean();
    OAMessageStyledTextBean oamessagestyledtextbean = new OAMessageStyledTextBean();
    OAMessageDateFieldBean oamessagedatefieldbean = new OAMessageDateFieldBean();
    OASwitcherBean oaswitcherbean = new OASwitcherBean();
    Hashtable hashtable = new Hashtable();
    hashtable.put("CtPPRTrgCol", new DataBoundValue(new CrossTableColumnData(i, "Name")));
    oaswitcherbean.setNamedChild("input", oamessagetextinputbean);
    oaswitcherbean.setNamedChild("date", oamessagedatefieldbean);
    oaswitcherbean.setChildNameBinding(new CrossTableColumnData(i, "Render"));
    oaflowlayoutbean.addIndexedChild(oaswitcherbean);
    oaflowlayoutbean.addIndexedChild(oamessagestyledtextbean);
    oamessagetextinputbean.setNameBinding(new CrossTableColumnData(i, "Name"));
    oamessagetextinputbean.setTextBinding(new CrossTableColumnData(i, "Text1"));
    oamessagetextinputbean.setAttributeValue(DESCRIPTION, new DataBoundValue(new CrossTableColumnData(i, "Label")));
    oamessagetextinputbean.setAttributeValue(COLUMNS_ATTR, "12");
    oamessagetextinputbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, OAWebBeanUtils.getFirePartialActionForSubmit(oamessagetextinputbean, null, "update", hashtable, null));
    oamessagetextinputbean.setDataType("NUMBER");
    oamessagetextinputbean.setAttributeValue(READ_ONLY_ATTR, new DataBoundValue(new CrossTableColumnData(i, "ReadOnly")));
    oamessagetextinputbean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, new DataBoundValue(new CrossTableColumnData(i, "SubmitValidator")));
    oamessagedatefieldbean.setNameBinding(new CrossTableColumnData(i, "Name"));
    oamessagedatefieldbean.setTextBinding(new CrossTableColumnData(i, "Text1"));
    oamessagedatefieldbean.setValueBinding(new CrossTableColumnData(i, "Text1"));
    oamessagedatefieldbean.setAttributeValue(DESCRIPTION, new DataBoundValue(new CrossTableColumnData(i, "Label")));
    oamessagedatefieldbean.setAttributeValue(COLUMNS_ATTR, "12");
    oamessagedatefieldbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, OAWebBeanUtils.getFirePartialActionForSubmit(oamessagedatefieldbean, null, "update", hashtable, null));
    oamessagedatefieldbean.setDataType("DATE");
    oamessagedatefieldbean.setAttributeValue(READ_ONLY_ATTR, new DataBoundValue(new CrossTableColumnData(i, "ReadOnly")));
    oamessagestyledtextbean.setTextBinding(new CrossTableColumnData(i, "Text2"));
    return oaflowlayoutbean;
    Pls let me know for any clarifications.
    Thanks,
    Srikanth

  • I need the old cache system with strict alphabetical filter, not the "intelligent" one. Is it possible to have it on this new version of Firefox ? Thanks.

    Hi, is it possible to have a strict alphabetical filter for the cache suggestions in fields (like with the previous version) instead of the new "intelligent" system? For example, if I type "fire dr", I only want suggestions "fire dragon" or "fire drake" but not "dragon fire" or "dread fire". Thanks!
    == This happened ==
    Every time Firefox opened
    == I updated Firefox

    Hi Morbus,
    thanks for your answer.
    First I must say that my question was in fact concerning Firefox 3.6.3. I updated my Firefox 3.0.19 to 3.6.3 and that's why I had this problem. But I also kept my 3.0.19 version and use it when I need the alphabetic field cache recognition (to play an online game in which you must be the first to recognize a picture and type its name in a field).
    I launched 3.6.3 and install the cache utility you recommend, but unfortunately it's not the function I need. My question doesn't concern URL cache but ''field'' cache, and I don't need a soft that opens a new window.
    I just would like to get the old alphabetic cache so the options are more restricted when I type, so I gain a little time. With the "new" cache, I have to type the whole name so the cache is not useful anymore.
    Sorry, I don't know if I make myself clear...

  • Auditing lob column changes when working with dbms_lob

    Hi,
    It seems that dml trigger doesn't fire when lob field is being updated using dbms_lob package.
    As it stated in Oracle documentation:
    "Using OCI functions or the DBMS_LOB package to update LOB values or LOB attributes of object columns does not cause Oracle to fire triggers defined on the table containing the columns or the attributes."
    I need to know that table was updated (or is about to be updated), how can I do that in case it is lob field that is being updated?
    Thank you!

    I need to know that table was updatedAUDIT
    Handle:      user13133099
    Status Level:      Newbie
    Registered:      Jul 21, 2010
    Total Posts:      6
    Total Questions:      4 (4 unresolved)
    so many questions without ANY answers.
    http://forums.oracle.com/forums/ann.jspa?annID=718
    Edited by: sb92075 on Oct 26, 2010 7:43 AM

  • How do I set a maximum length (in characters) of a CLOB field

    Hi,
    I've seen some questions like this around, but I did not find a clear answer.
    This is my problem: I want to make my CLOB field to accept a maximum of 32768 characters. This is because I need other data manipulation tools to receive an ORA error when they try to insert or update text larger than 32768.
    I tried with an Insert/Update trigger, but I received ORA error that actually means that LOB fields can not be used in update trigger(or something).
    Please, help!

    Maybe, Not a neat way to do things, but seems to work.
    Others may be able to suggest better solutions.
    SQL> create table test_lob(lob clob) ;
    Table created.
    SQL> CREATE OR REPLACE FUNCTION getlength(p_lob CLOB) RETURN NUMBER DETERMINISTIC IS
      2  BEGIN
      3      IF (dbms_lob.getlength(p_lob) > 32768)
      4      THEN
      5          raise_application_error(-20100,
      6                                  'Text may not be greater than 32768 characters!');
      7      ELSE
      8          RETURN NULL;
      9      END IF;
    10  END;
    11  /
    Function created.
    SQL> create index idx_test_lob on test_lob(getlength(lob)) ;
    Index created.
    SQL>
    SQL> declare
      2    l_lob CLOB ;
      3  begin
      4    insert into test_lob values (empty_clob()) returning lob into l_lob ;
      5    dbms_lob.writeappend(l_lob, 32767, rpad('*', 32767, '*')) ;
      6  end ;
      7  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2    l_lob CLOB ;
      3  begin
      4    insert into test_lob values (empty_clob()) returning lob into l_lob ;
      5    dbms_lob.writeappend(l_lob, 32760, rpad('*', 32760, '*')) ;
      6    dbms_lob.writeappend(l_lob, 8, rpad('*', 8, '*')) ;
      7  end ;
      8  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2    l_lob CLOB ;
      3  begin
      4    insert into test_lob values (empty_clob()) returning lob into l_lob ;
      5    dbms_lob.writeappend(l_lob, 32760, rpad('*', 32760, '*')) ;
      6    dbms_lob.writeappend(l_lob, 9, rpad('*', 9, '*')) ;
      7  end ;
      8  /
    declare
    ERROR at line 1:
    ORA-20100:
    ORA-06512: at "SYS.DBMS_LOB", line 789
    ORA-06512: at line 6
    SQL> select count(*) from test_lob ;
      COUNT(*)
             2
    1 row selected.
    SQL>

  • LOBs tablespace issue

    Hello everyone!!!
    I'm using for testing an ORACLE XE on my own XP machine (which has a cluster of 4K), and I've created a tablespace for LOBs with those settings:
    CREATE TABLESPACE lobs_tablespace
    DATAFILE '.....lobs_datafile.dbf'
    SIZE 20M
    AUTOTEXTEND ON
    NEXT 20M
    MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL
    BLOCKSIZE 16K;
    so I created a test table with a LOB field:
    CREATE TABLE test_table
    ID NUMBER,
    FIELD1 VARCHAR2(50)
    FIELD2 BLOB,
    CONSTRAINT......
    LOB (FIELD2) STORE AS LOB_FIELD2 (
    TABLESPACE lobs_tablespace
    STORAGE (INITIAL 5M NEXT 5M PCTINCREASE 0 MAXEXTENTS 99)
    CHUNK 16384
    NOCACHE NOLOGGING
    INDEX LOB_FIELD2_IDX (
    TABLESPACE lobs_tablespace_idxs));
    where lobs_tablespace_idxs is created with blocksize of 16K
    so at this point, because i'm doing some tests on functions, I tried to insert in this table with a:
    FOR i IN 1..10000 LOOP
    fn_insert_into_table('description', 'filename');
    END LOOP;
    trying to insert a word file with dimension of almost 5Mb and I get the datafile lobs_datafile.dbf increased from start of 50M to almost 5Gb...
    I have some parameters settled as:
    db_16K_cache_size=1028576
    db_block_checking = false
    undo_management = auto
    db_block_size = 8192
    sga_target = 128M
    sga_max_size = 256M
    so the question is: doing some calculus 5Mb of a file * 10000 should be at max 60Mb...not 5Gb...so why the datafile increased so much as like it did? shall I have to check something else that I've missed?....
    Thanks a lot to everyone! :-)

    Hi,
    I'm guessing that you'll need to do a bit of a re-org in order to free up the space.
    You may well be able to do that just at the LOB level, rather than rebuilding the entire table.
    There's stuff about that in Chapter 3 of the 10G App Developers Guide: Large Objects.
    Of course, it the table is now empty, then you might as well just drop it and recreate.
    After that, you should be able to resize the datafile.

  • BSP - How to set header-field "no-store"

    Hello.
    I need to set the HTTP-header-field "no-store" in a BSP-application. The Problem is, that i do'nt know, how to do this.
    I just do'nt know, which strings have to be passed to the method "set_header_field". The W3C-RFC gives the following information:
        Cache-Control   = "Cache-Control" ":" 1#cache-directive
        cache-directive = cache-request-directive
             | cache-response-directive
        cache-request-directive =
               "no-cache"                          ; Section 14.9.1
             | "no-store"                          ; Section 14.9.2
             | "max-age" "=" delta-seconds         ; Section 14.9.3, 14.9.4
             | "max-stale" [ "=" delta-seconds ]   ; Section 14.9.3
             | "min-fresh" "=" delta-seconds       ; Section 14.9.3
             | "no-transform"                      ; Section 14.9.5
             | "only-if-cached"                    ; Section 14.9.4
             | cache-extension                     ; Section 14.9.6
         cache-response-directive =
               "public"                               ; Section 14.9.1
             | "private" [ "=" <"> 1#field-name <"> ] ; Section 14.9.1
             | "no-cache" [ "=" <"> 1#field-name <"> ]; Section 14.9.1
             | "no-store"                             ; Section 14.9.2
             | "no-transform"                         ; Section 14.9.5
             | "must-revalidate"                      ; Section 14.9.4
             | "proxy-revalidate"                     ; Section 14.9.4
             | "max-age" "=" delta-seconds            ; Section 14.9.3
             | "s-maxage" "=" delta-seconds           ; Section 14.9.3
             | cache-extension                        ; Section 14.9.6
        cache-extension = token "=" ( token
    I already tried some combinations, but none of them worked. As i have already searched the SDN-Forum and google, i hope that somebody in this forum knows, how to do the trick...
    Regards
    Jörg Neumann

    Hello Cornelia.
    I have tried setting the header field "max-age=0" and copied the set_header_field-instructions into the eventhandler OnInputProcessing, but this does not solve the problem - it made it even worse.
    After setting the header-field "max-age=0", the browser read the page from the local cache for EVERY click on the back-button.
    This seemed a little weird to me and so i started testing around...
    I am of the oppinion, that the 3 function-calls are overwriting the content of the field "Cache-Control".
    Adding the header-fields in the following sequence leads to the "50%-problem" described above:
    CALL METHOD response->set_header_field( name = 'Cache-Control' value  = 'max-age=0' ).
    CALL METHOD response->set_header_field( name = 'Cache-Control' value  = 'no-cache' ).
    CALL METHOD response->set_header_field( name = 'Cache-Control' value  = 'no-store' ).
    Any sequence, in which "no-store" was not the last field added, made the browser read the page from the cache for every click on the back-button.
    So i think, that i have to set all of the 3 fields, you suggested, and i am only setting one because every function call overwrites all Cache-Control-Directives.
    If my conclusions are right, the field Cache-Control should be sort of a "structure" and i have to set 3 of its fields...
    Regards
    Jörg Neumann

  • Strip strings from LOB

    I am trying to strip out a string that appears multiple times in a lob field. I think I have the code, but it seems to be skipping every other occurrence, and I must be missing something silly, but need some help - this is on a 10g XE database.
    create table t (num number, xml clob);
    declare
    l_xml1 clob;
    l_xml2 clob;
    l_sql varchar2(4000);
    l_ctx sys.dbms_xmlgen.ctxHandle ;
    l_pattern varchar2(4000) := '<?xml version="1.0"?>';
    l_start_loc integer := 1;
    l_offset integer := 1;
    l_substr varchar2(4000);
    l_nth integer := 1;
    l_len number;
    begin
    dbms_output.put_line('Begin');
    l_sql := 'select sysdate, 1 from dual';
    l_ctx := sys.dbms_xmlgen.newContext(queryString => l_sql);
    l_xml1 := sys.dbms_xmlgen.getXML(ctx => l_ctx);
    sys.dbms_xmlgen.closeContext(l_ctx);
    l_sql := 'select sysdate, 2 from dual';
    l_ctx := sys.dbms_xmlgen.newContext(queryString => l_sql);
    l_xml2 := sys.dbms_xmlgen.getXML(ctx => l_ctx);
    sys.dbms_xmlgen.closeContext(l_ctx);
    dbms_lob.append(src_lob => l_xml2, dest_lob =>l_xml1);
    l_sql := 'select sysdate, 3 from dual';
    l_ctx := sys.dbms_xmlgen.newContext(queryString => l_sql);
    l_xml2 := sys.dbms_xmlgen.getXML(ctx => l_ctx);
    sys.dbms_xmlgen.closeContext(l_ctx);
    dbms_lob.append(src_lob => l_xml2, dest_lob =>l_xml1);
    l_sql := 'select sysdate, 4 from dual';
    l_ctx := sys.dbms_xmlgen.newContext(queryString => l_sql);
    l_xml2 := sys.dbms_xmlgen.getXML(ctx => l_ctx);
    sys.dbms_xmlgen.closeContext(l_ctx);
    dbms_lob.append(src_lob => l_xml2, dest_lob =>l_xml1);
    l_sql := 'select sysdate, 5 from dual';
    l_ctx := sys.dbms_xmlgen.newContext(queryString => l_sql);
    l_xml2 := sys.dbms_xmlgen.getXML(ctx => l_ctx);
    sys.dbms_xmlgen.closeContext(l_ctx);
    dbms_lob.append(src_lob => l_xml2, dest_lob =>l_xml1);
    insert into t (num, xml) values (1, l_xml1);
    l_len := length(l_pattern);
    dbms_output.put_line('l_len: '||l_len);
    while l_start_loc <> 0
    loop
    dbms_output.put_line('l_nth: '||l_nth);
    l_start_loc := dbms_lob.instr(lob_loc => l_xml1,
    pattern => l_pattern,
    offset => l_offset,
    nth => l_nth);
    dbms_output.put_line('Start location: '||l_start_loc);
    if l_start_loc <> 0 then
    dbms_lob.erase(lob_loc => l_xml1, amount => l_len, offset => l_start_loc);
    dbms_output.put_line('String deleted');
    end if;
    l_nth := l_nth + 1;
    end loop;
    insert into t (num, xml) values (2, l_xml1);
    commit;
    dbms_output.put_line('End');
    end;
    If you look at the 2 rows inserted into the table, it appears only every other string was removed, and I can't figure out why.
    Thanks in advance

    Well, your code's a bit hard to read but it looks like you are:
    - Reading the nth occurrence of the string, with n = 1
    - Erasing this occurrence of the string
    - Reading the nth occurrence of the string in the remaining lob, with n = 2
    - Erasing this occurrence of the string
    So you will be reading the 1st, 3rd, 6th, ..., n(n+1)/2 th occurrences.
    cheers,
    Anthony

  • LOB RESTRICTION

    I Need to make an insertion using the
    INSERT command from a text size 50kb.
    I know that LOB field only accepts 4kb.
    What should I do to eliminate this limitation?
    Once again, thanks for the help.
    null

    The maximum size of LOB is 4 gigabytes. So, go ahead with you insertion.

  • Sqlload or ctxload: how do I get a file into a LOB?

    For some reason sqlload does NOT work the
    way it is described in Intermedia guide:
    keywords like FILLER or LOBFILE are not
    recognized.
    Is there a (preferably simple) way of loading
    a file ("x.doc", MSWord document) into a
    LOB field using ctxload. This far I've done
    everything as in the manual, but I get an
    error message:
    ctxload -user xxxi/yyy@devdb -update -file /tmp/x.doc -pk 1 -name test
    NLS_LANG not set - using defaults.
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'CTXSYS.CTX_DML' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    Should use sqlloader to do the insert.
    Also, error message indicates that there is a package missing from your install.
    - Paul
    null

  • Data Guard and LOBs

    Hi, this is my first post.
    I have Oracle9i Enterprise Edition Release 9.2.0.5.0 and my OS is AIX 5.2
    I have a Primary Database with a Standby database. I want to know if Data Guard can transport to the standby database the tables with LOBs fields created in my primary database.
    Thanks.

    Physical Standby : yes. Logical standby: not sure. I would need to query the Dataguard Concepts and Administration Manual, where this is documented.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • Need help with database connection and trasaction!

    Hi, I'm trying to load data from a huge report to DB2. My old way of doing this is: 1. using DriverManger.getConnection to get a connection. 2. Then set autoCommit to false. 3. Keep the connection open..... 4. con.commit once I reach a section, let's

  • How to save then quit excel using activeX

    The task that I need to do is open existing excel file, append data to the last row, save data then close it. Everything works fine except saving the data. I used property workbook note to save then invoke node to close a workbook then invoke node to

  • List of Built in Functions

    Hi, Can anyone tell me how to get list of built in Oracle functions..eg(Sum,Count,Trim,etc).. Thanx in adv Balajee

  • Adding unicode fonts to Preferences International Input Menu

    Does anyone know how to add unicode fonts to Preferences>International>Input Menu? I can figure out how to install fonts, but I can't get them to show up in this menu.. The first two fonts are Hangul and Kotoeri.

  • Can't use aircard with airport on

    I use an aircard (wireless modem) hooked to a Usb port to access the internet and I have an airport express hooked to my stereo and a printer to stream music or print from my laptop. They both work fine alone, but if I have my airport on to print or