Oracle 9i Objects with Forms6i

I am using Oracle 9i server and dev 6i (forms6i).
i have a form based on Object tables (including REF's items). when i try to insert update, delete the reocrd in the form, it gives error.
Insert/Update/Delete failed because of OCI_22132: hexadecimal string does not corresopond to a valid REF.
when i remove REFs items from form (not from database) then it does all functions (insert,update,delete,query).
Actually i haved used this form with Oracle 8i and it did all functions(insert,update,delete,query). i am using the same tables and types definations in Oracle 9i but it is not working.
Note: Insert, Update, Delete, or Query is not being done through forms when using REFs items. Others tools like sql*plus are performing the same actions very well.
Please help.
I will be thankful to you.
M. Faisal.

Mohammad,
If you have a Oracle Support customer id, you should go to http://metalink.oracle.com to file an iTAR about this.
Regards,
Geoff
I am using Oracle 9i server and dev 6i (forms6i).
i have a form based on Object tables (including REF's items). when i try to insert update, delete the reocrd in the form, it gives error.
Insert/Update/Delete failed because of OCI_22132: hexadecimal string does not corresopond to a valid REF.
when i remove REFs items from form (not from database) then it does all functions (insert,update,delete,query).
Actually i haved used this form with Oracle 8i and it did all functions(insert,update,delete,query). i am using the same tables and types definations in Oracle 9i but it is not working.
Note: Insert, Update, Delete, or Query is not being done through forms when using REFs items. Others tools like sql*plus are performing the same actions very well.
Please help.
I will be thankful to you.
M. Faisal.

Similar Messages

  • Forms6i abd Oracle App Object Lib (AOL)

    Hi all,
    I am a PowerBuilder Developer (10 years) and a Forms6i novice.
    PowerBulider is delivered with Foundation Class called PFC.
    Is Oracle Application Object Library (AOL)its equivalent?
    Is it only delivered with Headstart for Oracle Apps 11i?
    Can I use AOL as a Foundation Class (Object Lib) for Forms 6i? Can I buy Headstart w/o consulting services?
    How do I get a copy of AOL? Where can I get a an Object Library for Oracle Forms6i so I can 'jump' start the development process. I am use to PFC in Powerbuilder.
    Please let me know if there are Oralce Oject Libs for 6i
    or 3rd party products.
    Thank you very much before hand, Jacques

    Try the following:
    Move the RMI classes to applib directory instead of encapsulating it in the application. This will ensure that the classes are seen across applications so that whoever activates the RMI registry will not be the only one who can see the RMI classes, but other apps that needed to bind their own classes can see them as well.
    Alternatively, you can add this in application.xml:
    <library path="<rmi class directory"/>
    or
    <library path="<jar file that contains rmi classes (ex. rmiclass.jar)>"/>

  • SCD's type 2 conflict with Oracle Dimension Object

    Hi everybody.
    I have a little problem understanding Oracle Dimension Objects and how to use it with SCD type 2.
    Oracle's documentation says: There must be a 1:n relationship between a parent and children. A parent can have one or more children, but a child can have only one parent.
    This makes me think that if i have, for example, a department 1 and zone 'A', this department ALWAYS have to map the same zone, the zone 'A' can have more than one department but one department have to map every time to the same zone.
    This is a correct example: department 1 maps to zone 'A' everytime
    Employee Department Zone
    1 1 A
    2 1 A
    This is an incorrect example: department 1 DOES NOT MAP to zone 'A' everytime
    Employee Department Zone
    1 1 A
    2 1 B
    Oracle's documentation says: You must not create dimensions in any schema that does not fully satisfy the dimensional relationships. Incorrect results can be returned from queries otherwise.
    OK, but what can we do if the department's zone actually change???
    In SCD type 2 we use the following technique:
    ID Employee Department Zone Start End
    1 1 1 A 2010-01-01 2010-01-02
    2 1 1 B 2010-01-03 null
    Now we can see that SCD type 2 does not follow the requirements that ORACLE recommends for the creation of Dimension Objects, I mean department 1 now maps to the older zone A and the newer zone B.
    Is it correct?
    Can somebody clarify this? I think is a conflict.
    Thanks.

    Hi,
    Is it correct?No, you are wrong. You mixed dimension attribute historization and hierarchy relationship.
    Behaviour of mapping for loading SCD2 dimension depends on how did you implement Department and Zone entities in your dimension -
    as a general attributes of lowest dimension level (EMPLOYEE) or as a higher levels in dimension hierarchy.
    If you define Department and Zone as attributes of EMPLOYEE level than behaviour of loading algorithm will be as you described -
    it is because OWB doesn't know that Department and Zone attributes compose hierarchy.
    But when you define additional levels Department and Zone - OWB tries to resolve conflicts over hierarchy in very simple way -
    for each child dimension value it choose single parent with minimal business key value.
    In your case loaded data will be:
    ID Employee Department Zone Start End
    1 1 1 A 2010-01-01 2010-01-02
    2 1 1 A 2010-01-03 null
    Since 10.2.0.4 patchset there is also Hierarchy Versioning feature (so configured for versioning level also contains EFFECTIVE_DATE, EXPIRATION_DATE columns).
    Regards,
    Oleg

  • MapBuilder Error:Can not find a GeoRaster object with specified rdt and rid

    Hello,
    I can't GeoRaster data in the preview of the MapBuilder and MapViewer. The GeoRasterViewer shows the Raster images without problems.
    MapBuilders error message:
    19.11.2008 13:07:11 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    19.11.2008 13:07:11 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    19.11.2008 13:07:11 oracle.sdovis.MapMaker buildDataMBR
    WARNUNG: null MBR resulted from buildDataMBR.
    The errror message of MapViewer is nearly the same with some more informations about the spatial query and the coordintes of the query window. If I run that spatial query in the sqldeveloper it returns a result!
    I did following stebs:
    - saved a tiff-Image in a GeoRaster table with pyramid an tiled images.
    - checked the sdo_geom_metadata --> they are correct
    - checked the sdo_georaster object for the rdt table name and rasterid --> they are correct
    - checked the rdt table --> objects with that rid are saved
    - checked the mdsys.sdo_geor_sysdata table --> entry is correct
    - validate the geraster with the sdo_geor.validategeoraster function --> object is valid
    - updated the spatial extend of the image and try again the preview functio--> the same error
    The databse server is a virtual Linux server with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit.
    The web server is a Window 2003 R2 Server with a weblogic server and mapviewer patch 5 (Ver1033p5_B081010).
    For a test I did the same (the same table script, the same raster data, the same import method) on a developer pc (WinXP Pro SP2) with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 (32bit) the same mapbuilder version but with the MapViewer QuickStartKid and it works fine!!!
    Has anyone an idea?
    Greeting,
    Cord
    Edited by: Corti on Nov 19, 2008 2:14 PM

    Hi Joao,
    Thanks so far.
    I'm previewing a GeoRaster theme. I created it with the MapBuilder GeoRaster wizard. The theme difinition is (out of the export file):
    RAS_DGK|
    null|
    RAS_DGK|
    GEORASTER|
    <?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="georaster">
    </styling_rules>|
    (GeoRaster table name is "RAS_DGK", theme name is also "RAS_DGK")
    I get following log information:
    preview without a coordinate or scale:
    MapBuilder Error (as pop up): MAPVIEWER 01005: no spatial data to render
    log file:
    20.11.2008 10:17:27 oracle.sdovis.LoadThemeData run
    FEINER: LoadThemeData running thread: Thread-43
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Original query window: -Infinity,-Infinity,NaN,NaN
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: [Query] select grt.GEORASTER, grt.GEORASTER.metadata.getClobVal() from RAS_DGK grt
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Fetch size: 100
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:17:27 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:17:27 oracle.sdovis.MapMaker buildDataMBR
    WARNUNG: null MBR resulted from buildDataMBR.
    preview with a center coordinate of the image and a scale:
    20.11.2008 10:18:43 oracle.sdovis.SRS getOptimalQueryWindow
    AM FEINSTEN: *** isGeodetic=false, unit=METER
    20.11.2008 10:18:43 oracle.sdovis.LoadThemeData run
    FEINER: LoadThemeData running thread: Thread-45
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Original query window: 2550045.7746478873,5608500.0,2551954.2253521127,5609500.0
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: [Query] select grt.GEORASTER, grt.GEORASTER.metadata.getClobVal() from RAS_DGK grt WHERE MDSYS.SDO_FILTER(grt.GEORASTER.spatialextent, MDSYS.SDO_GEOMETRY(2003, 31466, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(?,?,?,?)), 'querytype=WINDOW') = 'TRUE'
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Fetch size: 100
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:18:43 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:18:43 oracle.sdovis.DBMapMaker renderEm
    INFO: **** time spent on loading features: 234ms.
    20.11.2008 10:18:43 oracle.sdovis.RenderingEngine prepareForRendering
    AM FEINSTEN: xfm: 0.284 0.0 0.0 -0.284 -724212.9999999999 1593097.9999999998
    20.11.2008 10:18:43 oracle.sdovis.ImageRenderer renderGeoRasterTheme
    WARNUNG: GeoRaster theme RAS_DGK has no rendered images.
    20.11.2008 10:18:43 oracle.sdovis.VectorRenderer render
    FEINER: time to render theme RAS_DGK with 0 styled features: 0ms
    20.11.2008 10:18:43 oracle.sdovis.DBMapMaker renderEm
    INFO: **** time spent on rendering: 16ms
    If I run the sql statement in the log file, it returns a result.
    select grt.georid, grt.GEORASTER, grt.GEORASTER.metadata.getClobVal()
    from ras_dgk grt
    WHERE MDSYS.SDO_FILTER(grt.GEORASTER.spatialextent,
    MDSYS.SDO_GEOMETRY(2003, 31466, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
    MDSYS.SDO_ORDINATE_ARRAY(2550045.7746478873,5608500.0,2551954.2253521127,5609500.0)), 'querytype=WINDOW') = 'TRUE';
    GEORID
    2
    GEORASTER
    MDSYS.SDO_GEORASTER(20001,MDSYS.SDO_GEOMETRY(2003,31466,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(2550000,5608000,2552000,5610000)),RDT_RAS_DGK,522,oracle.xdb.XMLType@194a7ec)
    GEORASTER.metadata.getClobVal()
    <georasterMetadata xmlns="http://xmlns.oracle.com/spatial/georaster">
    <objectInfo>
    <rasterType>20001</rasterType>
    <isBlank>false</isBlank>
    <defaultRed>1</defaultRed>
    <defaultGreen>1</defaultGreen>
    <defaultBlue>1</defaultBlue>
    </objectInfo>
    <rasterInfo>
    <cellRepresentation>UNDEFINED</cellRepresentation>
    <cellDepth>8BIT_U</cellDepth>
    <totalDimensions>2</totalDimensions>
    <dimensionSize type="ROW">
    <size>6299</size>
    </dimensionSize>
    <dimensionSize type="COLUMN">
    <size>6299</size>
    </dimensionSize>
    <ULTCoordinate>
    <row>0</row>
    <column>0</column>
    </ULTCoordinate>
    <blocking>
    <type>REGULAR</type>
    <totalRowBlocks>4</totalRowBlocks>
    <totalColumnBlocks>4</totalColumnBlocks>
    <rowBlockSize>2048</rowBlockSize>
    <columnBlockSize>2048</columnBlockSize>
    </blocking>
    <interleaving>BSQ</interleaving>
    <pyramid>
    <type>DECREASE</type>
    <resampling>NN</resampling>
    <maxLevel>6</maxLevel>
    </pyramid>
    <compression>
    <type>NONE</type>
    </compression>
    </rasterInfo>
    <spatialReferenceInfo>
    <isReferenced>true</isReferenced>
    <SRID>31466</SRID>
    <modelCoordinateLocation>UPPERLEFT</modelCoordinateLocation>
    <modelType>FunctionalFitting</modelType>
    <polynomialModel rowOff="0" columnOff="0" xOff="0" yOff="0" zOff="0" rowScale="1" columnScale="1" xScale="1" yScale="1" zScale="1">
    <pPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
    <polynomialCoefficients>17668678.695368 0 -3.14949718277477</polynomialCoefficients>
    </pPolynomial>
    <qPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
    <polynomialCoefficients>1</polynomialCoefficients>
    </qPolynomial>
    <rPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
    <polynomialCoefficients>-8031218.31607409 3.14949718277477 0</polynomialCoefficients>
    </rPolynomial>
    <sPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
    <polynomialCoefficients>1</polynomialCoefficients>
    </sPolynomial>
    </polynomialModel>
    </spatialReferenceInfo>
    <layerInfo>
    <layerDimension>BAND</layerDimension>
    <subLayer>
    <layerNumber>1</layerNumber>
    <layerDimensionOrdinate>0</layerDimensionOrdinate>
    <layerID>1</layerID>
    <colorMap>
    <colors>
    <cell value="0" blue="255" red="255" green="255" alpha="255"/>
    <cell value="1" blue="0" red="0" green="0" alpha="255"/>
    </colors>
    </colorMap>
    </subLayer>
    </layerInfo>
    </georasterMetadata>
    I checked also the content of rdt table and it contains entries with that raster id (= 522).
    Finally the log file when I use the preview directly on the GeoRaster table without a theme:
    20.11.2008 10:23:46 oracle.sdovis.LoadThemeData run
    FEINER: LoadThemeData running thread: Thread-55
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Original query window: -Infinity,-Infinity,NaN,NaN
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: [Query] select grt.GEORASTER from RAS_DGK grt where grt.GEORASTER.rasterid = ? and grt.GEORASTER.rasterdatatable = ?
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Fetch size: 100
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:23:46 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:23:46 oracle.sdovis.MapMaker buildDataMBR
    WARNUNG: null MBR resulted from buildDataMBR.
    If you need more information - please ask for it.
    Cord

  • Oracle Stored Procedure with out parameter

    Good morning,
    Is it possible to use an Oracle stored procedure with out parameters in MII ?
    If yes, what is the manipulation to see the values of parameters Out?
    Thank you

    Michael,
    This is the  MII query template  :
    DECLARE
    STRCOMPTERENDU NVARCHAR2(200);
    BEGIN
    STRCOMPTERENDU := NULL;
    XMII.SP_VALIDATEPROCESSORDERSLIST2 ( STRCOMPTERENDU => [Param.1]  );
    COMMIT;
    END;
    and the stocked procedure code
    CREATE OR REPLACE PROCEDURE XMII.SP_ValidateProcessOrdersList2(strCompteRendu OUT nVarchar2) IS
    tmpVar NUMBER;
    debugmode INT;
    strClauseSql varchar(2048);
    strListPOactif varchar(1024);
    dtmTimeStamp DATE;
       NAME:       SP_ValidateProcessOrdersList
       PURPOSE:   
       REVISIONS:
       Ver        Date        Author           Description
       1.0        18/06/2008          1. Created this procedure.
       NOTES:
       Automatically available Auto Replace Keywords:
          Object Name:     SP_ValidateProcessOrdersList
          Sysdate:         18/06/2008
          Date and Time:   18/06/2008, 18:45:32, and 18/06/2008 18:45:32
          Username:         (set in TOAD Options, Procedure Editor)
          Table Name:       (set in the "New PL/SQL Object" dialog)
    BEGIN
       tmpVar := 0;
       debugmode := 0;
       -- lecture date systeme pour time stamp
       select sysdate  into dtmTimeStamp from dual;
       if debugmode = 1 then
        DBMS_OUTPUT.put_line('SP_ValidateProcessOrdersList');
       end if;
       -- insertion du bloc dans le log
       insert into LOG_ORDER
        (DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
       values
       (dtmTimeStamp,'SP_ValidateProcessOrdersList',ID_LOG_ORDER.nextval);
       Commit;
        if debugmode = 1 then
        DBMS_OUTPUT.put_line('insertion LOG OK');
       end if;
    strCompteRendu := '0123456-896;0123456-897';
    commit; 
       EXCEPTION
         WHEN NO_DATA_FOUND THEN
           NULL;
         WHEN OTHERS THEN
         ROLLBACK;
         -- insertion du bloc dans le log
       insert into LOG_ORDER
        (DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
       values
       (dtmTimeStamp,' ',ID_LOG_ORDER.nextval);
       COMMIT;
           -- Consider logging the error and then re-raise
           RAISE;
    END SP_ValidateProcessOrdersList2;
    Thanks for your help
    Alexandre

  • Calling Oracle stored procedure with out param of user define type from Entity Framework 5 with code first

    Guys i am using Entity Framework 5 code first (I am not using edmx) with Oracle and all works good, Now i am trying to get data from stored procedure which is under package but stored procedure have out param which is user define type, Now my question is
    how i will call stored procedure from entity framework
    Thanks in advance.

    I agree with you, but issue is we have lots of existing store procedure, which we need to call where damn required. I am sure those will be few but still i need to find out.
    If you think you are going to get existing MS Stored Procedures  or Oracle Packages that had nothing to do with the ORM previously to work that are not geared to do simple CRUD operations with the ORM and the database tables, you have a rude awakening
    coming that's for sure. You had better look into using ADO.NET and Oracle Command objects and call those Oracle Packages by those means and use a datareader.
    You could use the EF backdoor, call Oracle Command object and use the Packages,  if that's even possible, just like you can use MS SQL Server Stored Procedures or in-line T-SQL via the EF backdoor.
    That's about your best shot.
    http://blogs.msdn.com/b/alexj/archive/2009/11/07/tip-41-how-to-execute-t-sql-directly-against-the-database.aspx

  • Inserting a new row in a BC4J View Object with an attribute of type BFileDomain

    Hi all,
    I've to insert a row in a View Object with an attribute of type oracle.jbo.domain.BFileDomain.
    I do this within an Application Module's method, which has an input parameter of type byte[]. This parameter will be the content of the BFILE.
    What's the right way for doing that?
    I've tried with the following code, but I've got an exception in committing the transaction:
    public int serializeDocument(int codDomanda, int codSorgente, byte[] content, String est, int type, int cost, String title, String arg) throws JboException {
    int code = 0;
    //File f;
    DocumentiTwoView = getDocumentiTwoView();
    java.sql.Statement stmt = ((DBTransaction) getTransaction()).createStatement(1);
    try {
    Row docRow = DocumentiTwoView.createRow();
    SequenceImpl seq = new SequenceImpl("documenti_seq", getDBTransaction());
    Integer next = (Integer) seq.getData();
    code = next.intValue();
    docRow.setAttribute("Coddocumento", new Number(code));
    docRow.setAttribute("Titolo", (String) title);
    docRow.setAttribute("Argomento", (String) arg);
    docRow.setAttribute("Costo", new Number(cost));
    docRow.setAttribute("Tipo", new Number(type));
    docRow.setAttribute("Coddomanda", new Number(codDomanda));
    docRow.setAttribute("Codsorgente", new Number(codSorgente));
    //f = new File("Doc" + code + "." + est)
    BFILE src_lob = null;
    ResultSet rset = null;
    rset = stmt.executeQuery ("SELECT BFILENAME('DOC_DIR', 'Doc" + code + "." + est + "') FROM DUAL");
    if (rset.next()) {
    src_lob = ((OracleResultSet)rset).getBFILE(1);
    BFileDomain bfd = new BFileDomain(src_lob);
    bfd.setBytes(content);
    bfd.saveToDatabase(getTransaction());
    docRow.setAttribute("Contenuto", (BFileDomain) bfd);
    catch (Exception ex) {
    getTransaction().rollback();
    throw new oracle.jbo.JboException("Impossibile creare il nuovo documento:\n" + ex.getMessage());
    finally {
    try {
    stmt.close();
    catch (Exception nex) {
    try {
    // Commit the whole transaction
    getTransaction().commit();
    catch (Exception e) {
    e.printStackTrace();
    getTransaction().rollback();
    throw new JboException("Impossibile eseguire il commit della transazione:\n" + e.getMessage());
    return code;
    Thanks a lot in advance!
    Christian
    null

    Odd, have you disabled caching and indirection? (NoIdentityMap, dontUseIndirection, or alwaysRefresh/disableCacheHits). If so, then this could be the issue.
    Otherwise please include the sample code you use to perform this, and verify that you do not have any unusual code in your set/get methods or in descriptor events. Also turn TopLink logging on and include a sample. Also ensure that you do not modify your objects until after registering them in the unit of work, and only modify the unit of work clones.

  • View Object with User Defined Type input

    I am trying to use a View Object with a query that requires a user defined object as an input parameter.
    I have the query working with a PreparedStatement, but would like to use a View Object.
    When I use the PreparedStatement, I prepare the user defined type data like this:
    // get the data into an object array
    Object[] wSRecObjArr = wSRec.getObjectArray();
    // set up rec descriptor
    StructDescriptor WSRecDescriptor = StructDescriptor.createDescriptor("WS_REC",conn);
    // populate the record struct
    STRUCT wSRecStruct = new STRUCT(WSRecDescriptor,conn,wSRecObjArr);
    Then I can use this in the PreparedStatement like this:
    OraclePreparedStatement stat = null;
    ResultSet rs = null;
    stat = (OraclePreparedStatement)conn.prepareStatement("Select test_pkg.test_function(?) FROM DUAL");
    stat.setSTRUCT(1, wSRecStruct);
    rs = stat.executeQuery();
    I would like to do the same process with a View Object instead of the PreparedStatement.
    My question is "How do I create the input objects"?
    I obtain the View Object from the Application Module using findViewObject(). I don't actually have a connection object to pass into the StructDescriptor.createDescriptor method.
    I have tried just using Java Object Arrays (Object[]) to pass the data, but that gave an error:
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    Any help or pointers are greatly appreciated.
    Thank you.
    Edited by: 942120 on May 1, 2013 8:45 AM
    Edited by: 942120 on May 1, 2013 8:46 AM
    Edited by: 942120 on May 1, 2013 9:05 AM
    Edited by: 942120 on May 1, 2013 9:06 AM

    Custom domains are the way to go.
    When I try to pass custom domains that represent my user defined types - it works.
    However, one of the functions requires a table of a user defined type be passed in.
    I tried creating a domain of the table type. It forces me to add a field during creation (in JDEV), so I tried adding a field of type Array of Element of the domain representing the user defined type.
    I populate the table by setting the field I created, but the table is empty in PL/SQL (TEST_TAB.COUNT = 0).
    I also tried passing the oracle.jbo.domain.Array object, but that produced an error:
    java.sql.SQLException: ORA-06553: PLS-306: wrong number or types of arguments in call
    I also tried passing Object[], but that produced an error:
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    How do I properly create, and pass an domain that represents a table of a user defined type?
    When I use a OraclePreparedStatement, I can pass a oracle.sql.ARRAY using stat.setARRAY.
    Thank you for the help you have provided, and any future advice.
    JDEV 10.1.2.3
    JDBC 10.2.0.5
    Edited by: 942120 on May 13, 2013 7:13 AM
    Edited by: 942120 on May 13, 2013 7:16 AM

  • Calling ORACLE Store Procedure with parameters in user define function

    Hi everybody,
    We have a scenario connecting Oracle DB thru JDBC adapter.
    We have to call store procedure with input parameter and output parameter to retrieve data from DB. The implementation was made using JDBC adapter by building the correct XML message with EXECUTE action, and it works fine.
    Now we need to use DB lookup within mapping. I wrote users define function with SELECT statement (using the JDBC adapter) and it works fine but I need to call store procedure in ORACLE instead of SELECT statement.
    I found lot of examples concerning DB lookup but none of them explained how to write UDF calling store procedure in ORACLE with input and output parameters.
    I am looking for an example.
    Thanks in advance,
    Gigi

    I agree with you, but issue is we have lots of existing store procedure, which we need to call where damn required. I am sure those will be few but still i need to find out.
    If you think you are going to get existing MS Stored Procedures  or Oracle Packages that had nothing to do with the ORM previously to work that are not geared to do simple CRUD operations with the ORM and the database tables, you have a rude awakening
    coming that's for sure. You had better look into using ADO.NET and Oracle Command objects and call those Oracle Packages by those means and use a datareader.
    You could use the EF backdoor, call Oracle Command object and use the Packages,  if that's even possible, just like you can use MS SQL Server Stored Procedures or in-line T-SQL via the EF backdoor.
    That's about your best shot.
    http://blogs.msdn.com/b/alexj/archive/2009/11/07/tip-41-how-to-execute-t-sql-directly-against-the-database.aspx

  • Oracle Designer 10g With Oracle 11g DB possible

    Hi,
    Please clarify my below query,
    we are currently using oracle designer 10g and deploying the components to production DB which is in oracle 9i, We are planning to migrate to oracle supported version 11g DB, since oracle designer 11g is not there we would be sticking to oracle 10g itself, Now my question is, will we be having issues or road blocks with this combination Oracle designer 10g and Oracle 11g DB???
    Regards
    Bala

    @Erik
    Don't have a doc id. You have to go to the certication tab in My Oracle Support. Search for Oracle Designer 10.1.2.6.0 there you will find the three supported database version.
    Oracle Designer 10.1.2.6.0 is certified with Oracle Database 11.2.0.1.0 on Microsoft Windows (32-bit) XP
    Oracle Designer 10.1.2.6.0 with Oracle Database 11.2.0.1.0
    Customers must review MetaLink Doc 1299040.1 Application Design Transformer Hangs at 65% when running against Oracle 11gR2
    Certified with:
    Oracle Fusion Middleware 10g 10.1.2.0.2 Oracle Developer Suites 10g 10.1.2.0.2 Oracle AS/DS Patch Set 10g 10.1.2.3.0
    @Bala
    Colleagues of mine have imported a designer repository inside 11gR2 and where not able to change objects inside the repository. When they imported the same designer dump inside an 11gR1 database it worked fine.
    In the other post (Re: 11G compatibility it is also written that there are some major bugs and those bugs will not be fixed.

  • Java Visualizer for Oracle 8i Object model

    I have used the java visualizer demo version that is within Ora8iR2 but it cant work with oracle spatial object model I think this version is designed for the relational model.
    Where I can find a object model oracle spatial visualizer??
    Where I can find any oraclevector2image (jpeg or gif) traslator?
    Anybody knows whats the procedure for geolocate the address field of any other table in the database?
    null

    This is a duplicate question. Answers are in the other posting. Thanks.
    Dan

  • Oracle 11g - Objects Access ?

    Oracle 11g - Objects Access ?
    =====================
    I hope this is the right forum for this issue, if not let me, where to go.
    We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
    We have a Schema A with database objects.
    We need to provide access to another group on selective items.
    We need to provide Read access to one table (T1) of Schema A and Insert/Update access to another one (T2).
    If we create another user/schema B in our instance, they can see other than T1 and T2 of Sch A via other User Objects (via TOAD/SQL Developer etc) or using Database catalog.
    How do we hide our other objects for User/Schema B?
    Thanks in helping.

    qwe16235 wrote:
    Oracle 11g - Objects Access ?
    =====================
    I hope this is the right forum for this issue, if not let me, where to go.
    We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
    We have a Schema A with database objects.
    We need to provide access to another group on selective items.
    We need to provide Read access to one table (T1) of Schema A and Insert/Update access to another one (T2).
    If we create another user/schema B in our instance, they can see other than T1 and T2 of Sch A via other User Objects (via TOAD/SQL Developer etc) or using Database catalog.
    How do we hide our other objects for User/Schema B?
    With Oracle everything is prohibited; except that which is explicitly GRANTed.
    simply put SCHEMA_B has privs to see objects that are owned by SCHEMA_A.

  • Oracle Data Objects greyed out

    Hello, quick question about ODT 10.2.0.2.10 beta for .NET2005.
    Oracle Data Objects are greyed out in my toolbox in web application. Also when I drag and drop table from Oracle Explorer onto the aspx form, all I get is text with Select statement.
    At the same time, all this functionality works ok in windows form.
    The same installation works ok in 2003, both web and windows forms.
    Thanks in advance.

    In vs2005, in an ASP.NET web application, you will need to right click on the default.aspx, select "View Component Designer" from the context menu and this will launch the Component (Windows Forms) Designer and then the ODP.NET components in the toolbox will be enabled.
    Let me know if this fixes your problem.

  • Oracle Express 10g with driver 10.2.0.1 - need to update to 10.2.0.5

    Hi,
    I am not sure if this is the correct place for this question but its where I have seen some other discussions on drivers.
    I have Oracle Express 10g installed on my pc, and some work servers and am getting some errors about memory issues and came across this message and decided to try the solution here too - Re: Attempted to read or write protected memory
    I have the 10.2.0.1 driver on the clients I am running and the app has 10.2.0.4 (I think) and so decided that updating the clients drivers might solve the problems as described in that thread.
    I have downloaded the instant client basic and odbc for windows x32 but am unsure what I need to do next as I have Oracle Express installed. I couldnt find one specifically for Express 10g.
    Do I have the correct drivers downloaded and how do I install them into odbc ?
    Many thanks, George.

    My understanding is that to be a MetaLink subscriber you have to be an Oracle customer or subscribe for Oracle support services. Since Oracle is only one of the many databases we support, and because our sole objective with Oracle is compatibility testing, it's unlikely that we will become subscribers unless it's essentially free.
    Oracle is tangential (not core) to our own offerings, so we don't have a pressing need for support. Is there some avenue for people in our shoes?

  • How to execute a function in oracle plsql object, when object dies

    I have a plsql object with a member function as exec_last.
    I want this procedure to be called when plsql object is cleaned or when the session hosting this object dies.
    In C, we have a system call as atexit(). Is there any such feature in Oracle 10g or any workaround using embedded java.
    This feature is required to flush the contents stored in plsql table in the object to the database, when program exits.
    Thank you,
    Warm Regards,
    Navin Srivastava

    navsriva wrote:
    Is there any better way to implement this in memory caching. What is the buffer cache of Oracle? It is exactly that - a memory cache for data blocks. Both new blocks (created by inserting new rows) and existing blocks (used by selects, updates and deletes, and re-used (freespace) by inserts).
    The Oracle buffer cache is a very mature and sophisticated cache. Attempting to do it "+better+" than the db buffer cache in another software layer (like PL/SQL) is mostly a waste of time and resources.. and invariable introduces another s/w layer that simply increases the number of moving parts. This in turn usually means increased complexity and slower performance.
    Why use bulk processing in PL/SQL? The basic and fundamental answer to that is to decrease the context switching between the PL engine and SQL engine.
    When running PL code to insert data into SQL, that data needs to be passed to the SQL engine, the PL engine needs to perform a context switch to the SQL engine to allow it to process that data and perform the SQL instruction.
    If there are a 1000 rows to inserts, it means a 1000 context switches.
    Bulk processing makes the "+communication/data pipe+" between the two bigger. Instead of passing a single row's data to the SQL engine via a context switch, a bulk collection/array of a 100 rows is passed. There is now a mere 10 context switches required to push that 1000 rows from the PL engine to the SQL engine.
    You can do the same from any other SQL client... (remember, that PL itself is also a SQL client). You can, using C/C++ for example, do the exact same thing. When passing row data to the SQL engine to insert, pass a collection of a 100 rows instead of the data for a single row.
    The exact same benefits result as in PL/SQL. A bigger communication pipe, allowing more data to be transferred to/from the SQL engine, resulting in less context switching.
    Of course, a context switch ito C/C++ is a lot more expensive than in PL/SQL - as the PL engine sits in the very same physical process as the SQL engine. Using C/C++, this will usually be a separate process communicating with the SQL engine process across the network.
    The same applies to other languages, like Java, C#, Delphi, Visual Basic and so on.
    It does not make sense to introduce another s/w layer, the PL/SQL engine, and have the client "+insert+" rows into its memory structures... and then use the PL engine to "+flush"+ that to the SQL engine via a bulk process command.
    It will be faster, and more scalable, having the client language using bulk processing directly and dealing with the SQL engine directly.
    Simple example. What does the SQL*Loader program (written in C) use? It does not use PL as a proxy for moving data from a CSV file into a SQL table. It calls SQL directly. It uses bulk processing. It is very fast at loading data.
    There is an exception to this. When PL is used as a business processing and validation layer. Instead of the client code implementing that logic, it is done using PL. The client then no longer will manually add an invoice to the INVOICES table for example. It instead calls the AddNewInvoice PL/SQL procedure - and this procedure does all. It checks the customer code as valid. Ensures that there's stock available of the products being ordered on the invoice. Etc.
    But in this scenario, PL is not used a secondhand "buffer cache". It is used for what it has been designed for - a proper application layer inside the database.

Maybe you are looking for

  • Difference in user exit , fm and includes

    HI, What is user exit , function module and includes? What is the difference among them? When and how to use them? Please provide example. Regards, Pramod

  • Show Messages when DB is Down

    Hi Experts, Actually obiee is integrated with siebel, we have some reports to fetch the data from siebel, if in case the siebel server is down , we just want to show that message something like 'Siebel Server is Down' . Is this possible in OBIEE. How

  • Flash Playback Problems

    Mac G5 Flash CS3 Hi, I'm creating a movie with a swift flies quickly across screen, but in playback it always appears as if there are two or three swifts flying together almost on top of one another, a sort of stuttering effect in the playback.  I've

  • ME 8 SDK on Mac OS X?

    I see this was asked a while back (Is the Java ME 8 SDK only for Windows?), but since this was several months back, is there any news whether there will be a Mac OS X version of the ME 8 SDK? Thanks, Kevin

  • BAPI for Create out bound delivery

    Hi ABAP Gurus , we are using following business process. Create Stock transport Order (Purchasing Document) - > Create Out Bound Delivery. Now for creating OBD from the Stock Transport Order , we have written a BDC for TCODE <b>VL10I</b>. It runs cor