Create Oracle Object with array inside

Hi
I want create a db type with an attribute of dbms_sql.varchar2_table  type
Example:
create or replace type t_obj_gest_csv_h
   as object
column_value_list dbms_sql.varchar2_table,
It's possible?
Stefano

Not with dbms_sql.varchar2_table. You can't reference PL/SQL types when creating SQL type. You can create SQL nested table type and use it in object type:
SQL> create or replace
  2    type StringList
  3      as table of varchar2(4000)
  4  /
Type created.
SQL> create or replace
  2    type t_obj_gest_csv_h
  3      as object(
  4                id number,
  5                s  StringList
  6               )
  7  /
Type created.
SQL>
SY.

Similar Messages

  • DAO in Websphere calling Oracle SP with array input params

    Hi,
    We have a complex Oracle stored procedure which gets called by the DAO in Websphere 5.1.
    The stored procedure takes couple of input array.
    Code snippet -
    CallableStatement cstmt = con.prepareCall("{call pkg_name.ap_name( ?,?,?,?,?,?,?,?,? )}");
    ArrayDescriptor desc = ArrayDescriptor.createDescriptor("STRING_VARRAY", con);
    ARRAY arr1 = new ARRAY(desc, con, strArray);
    cstmt.setArray(1, arr1);
    I get this exception when trying to create Oracle array desciptor -
    java.lang.ClassCastException: com/ibm/ws/rsadapter/jdbc/WSJdbcConnection incompatible with oracle/jdbc/OracleConnection
    How can I get a OracleJdbcConnection object from WSJdbcConnection?
    Is there any way to do this using the WS Jdbc classes?
    Is there any other way to pass an array to a callable statement?
    TIA.
    - vineet

    Hi,
    We have a complex Oracle stored procedure which gets
    called by the DAO in Websphere 5.1.
    The stored procedure takes couple of input array.
    Code snippet -
    CallableStatement cstmt = con.prepareCall("{call
    pkg_name.ap_name( ?,?,?,?,?,?,?,?,? )}");
    ArrayDescriptor desc =
    ArrayDescriptor.createDescriptor("STRING_VARRAY",
    con);
    ARRAY arr1 = new ARRAY(desc, con, strArray);
    cstmt.setArray(1, arr1);
    I get this exception when trying to create Oracle
    array desciptor -
    java.lang.ClassCastException:
    com/ibm/ws/rsadapter/jdbc/WSJdbcConnection
    incompatible with oracle/jdbc/OracleConnection
    How can I get a OracleJdbcConnection object from
    WSJdbcConnection?
    Is there any way to do this using the WS Jdbc
    classes?
    Is there any other way to pass an array to a callable
    statement?
    TIA.
    - vineetI am experiencing the same ClassCastException when creating an ArrayDescriptor. It occurs on execution the following line of code:-
    oracle.sql.ArrayDescriptorarrayDesc = oracle.sql.ArrayDescriptor.createDescriptor(schema + "." + table, conn);
    Java Context: Stateless EJB
    J2EE Version: 1.3
    JRE Version: 1.4.2
    EJB Version: 2.0
    J2EE Container: WebSphere v5.1.1.2, build number cf20446.02
    Container transaction type: Required (for all remote methods)
    Oracle Impl class: oracle.jdbc.xa.client.OracleXADataSource
    Oracle driver file: classes12.zip
    Oracle Version: 8.1.7.4
    Is there a solution to this issue?

  • Dynamically creating oracle table with csv file as source

    Hi,
    We have a requirment..TO create a dynamic external table.. Whenever the data or number of columns change in the CSV file the table should be replaced with current data and current number of columns...as we are naive experienced people in oracle please give us a clear solution.. We have tried with a code already ..But getting some errors. Code given below..
    thank you
    we have executed this code by changing the schema name and table name ..Remaining everything same ...
    Assume the following:
    - Oracle User and Schema name is ALLEXPERTS
    - Database name is EXPERTS
    - The directory object is file_dir
    - CSV file directory is /export/home/log
    - The csv file name is ALLEXPERTS_CSV.log
    - The table name is all_experts_tbl
    1. Create a directory object in Oracle. The directory will point to the directory where the file located.
    conn sys/{password}@EXPERTS as sysdba;
    CREATE OR REPLACE DIRECTORY file_dir AS '/export/home/log';
    2. Grant the directory privilege to the user
    GRANT READ ON DIRECTORY file_dir TO ALLEXPERTS;
    3. Create the table
    Connect as ALLEXPERTS user
    create table ALLEXPERTS.all_experts_tbl
    (txt_line varchar2(512))
    organization external
    (type ORACLE_LOADER
    default directory file_dir
    access parameters (records delimited by newline
    fields
    (txt_line char(512)))
    location ('ALLEXPERTS_CSV.log')
    This will create a table that links the data to a file. Now you can treat this file as a regular table where you can use SELECT statement to retrieve the data.
    PL/SQL to create the data (PSEUDO code)
    CREATE OR REPLACE PROCEDURE new_proc IS
    -- Setup the cursor
    CURSOR c_main IS SELECT *
    FROM allexperts.all_experts_tbl;
    CURSOR c_first_row IS ALLEXPERTS_CSV.logSELECT *
    FROM allexperts.all_experts_tbl
    WHERE ROWNUM = 1;
    -- Declare Variable
    l_delimiter_count NUMBER;
    l_temp_counter NUMBER:=1;
    l_current_row VARCHAR2(100);
    l_create_statements VARCHAR2(1000);
    BEGIN
    -- Get the first row
    -- Open the c_first_row and fetch the data into l_current_row
    -- Count the number of delimiter l_current_row and set the l_delimiter_count
    OPEN c_first_row;
    FETCH c_first_row INTO l_current_row;
    CLOSE c_first_row;
    l_delimiter_count := number of delimiter in l_current_row;
    -- Create the table with the right number of columns
    l_create_statements := 'CREATE TABLE csv_table ( ';
    WHILE l_temp_counter <= l_delimiter_count
    LOOP
    l_create_statement := l_create_statement || 'COL' || l_temp_counter || ' VARCHAR2(100)'
    l_temp_counter := l_temp_counter + 1;
    IF l_temp_counter <=l_delimiter_count THEN
    l_create_statement := l_create_statement || ',';
    END IF;
    END;
    l_create_statement := l_create_statement || ')';
    EXECUTE IMMEDIATE l_create_statement;
    -- Open the c_main to parse all the rows and insert into the table
    WHILE rec IN c_main
    LOOP
    -- Loop thru all the records and parse them
    -- Insert the data into the table created above
    END LOOP;

    The initial table is showing errors and the procedure is created with compilation errors
    After executing the create table i am getting the following errors
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "identifier": expecting one of: "badfile,
    byteordermark, characterset, column, data, delimited, discardfile,
    disable_directory_link_check, exit, fields, fixed, load, logfile, language,
    nodiscardfile, nobadfile, nologfile, date_cache, processing, readsize, string,
    skip, territory, varia"
    KUP-01008: the bad identifier was: deli
    KUP-01007: at line 1 column 9
    ORA-06512: at "SYS.ORACLE_LOADER", line 19

  • Use of Complex Oracle Object with JDBC

    How can I use Oracle Object(or PL/Sql type) with JDBC
    I have a structure of record with some attributes and table of another attribute.
    My types are defined as follows !
    <code>
    CREATE TYPE EMPLOYEE_GRADES AS TABLE OF VARCHAR2(50)
    CREATE TYPE EMPLOYEES AS OBJECT(EmpName VARCHAR2(50), EmpGrades Employee_Grades)
    </code>
    My custom object might have the following structure (or should it be different)
    <code>
    public class EmpColl implements CustomDatum, CustomDatumFactory
    -- other stuff ----
    /* fields */
    public String empName;
    public Collection empNos;
    </code>
    I want to pass an variable of type EMPLOYEES to an procedure.
    Thanx in Advance
    Chetan
    [email protected]

    <code>
    CREATE TYPE EMPLOYEE_GRADES AS TABLE OF VARCHAR2(50)
    CREATE TYPE EMPLOYEES AS OBJECT(EmpName VARCHAR2(50), EmpGrades Employee_Grades)
    </code>The easiest is to use JPublisher (which comes with the SQLJ distribution).
    Say:
    jpub -user=username/password -sql=EMPLOYEES:Employees,EMPLOYEE_GRADES:EmployeeGrades
    You will get (among others) the Java files Employees.java and EmployeeGrade.java. Go ahead, compile and use them.
    Look in [Oracle Home]/sqlj/demo/jpub for a number of additional examples, and in the JPublisher User's Guide for background info.
    The next (9.2) release of JPublisher will also provide some support for accessing legacy PL/SQL types from Java.

  • Error when create XMLType object with JDBC connection

    Hello, I try to get an XMLType object with JDBC, but it doesn't work. Can somebody help me?
    My code is :
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@"+"a02w03:1521:PROJET", "scott", "tiger");
    OraclePreparedStatement stmt = (OraclePreparedStatement) conn.prepareStatement("select xmldoc from cv_col");
    ResultSet rset = stmt.executeQuery();
    OracleResultSet orset = (OracleResultSet) rset;
    while(orset.next())
    OPAQUE o = orset.getOPAQUE(1);
    System.out.println(o.getSQLTypeName());
    XMLType poxml = XMLType.createXML(o);
    My database table:
    CREATE TABLE cv_col (
    XMLDoc xmltype
    Execution: The SQL type name "SYS.XMLTYPE" is write and then I obtain the error:
    Exception in thread main
    java.lang.NoSuchMethodError: java.lang.String oracle.jdbc.internal.OracleConnection.getProtocolType()
         at oracle.xdb.XMLType.initConn(XMLType.java:2072)
         at oracle.xdb.XMLType.<init>(XMLType.java:903)
         at oracle.xdb.XMLType.createXML(XMLType.java:493)
         at Prog.main(Prog.java:26)
    Process exited with exit code 1.
    Thank you, very much!

    What platform are you using for the database, what are you running your code on.
    Which database version are you working with.. What is your class path. What version of JDBC and OCI are in the client environment, eg what are CLASSPATH and PATH / LD_LIBRARY_PATH settings. Have you tested your code using a simple IDE like Oracle's JDeveloper or run it from directly from the command line.

  • Error during create business object with XACML schema

    Hi
    I can't create a policyset business object with access_control-xacml-2.0-policy-schema-cd-04.xsd schema file in Jdeveloper 11.1.1.3 with bpm11g extension.
    it raise bellow error message.
    you can find the schema file from bellow link.
    http://www.oasis-open.org/committees/download.php/10577/XACML-2.0-CD-ALL.zip
    after download the zip file ,you only need the access_control-xacml-2.0-policy-schema-cd-04.xsd file,
    start Jdeveloper in debug mode(run jdev in console), import xsd file to bpm project, and create the business object, then
    you will got bellow error message.
    Does any one know how to solve it?
    Thanks.
    ----------------error message from jdeveloper debug console-------------------------
    Exception occurred during event dispatching:
    oracle.bpm.project.catalog.type.TypeLoadRuntimeException: BPM-71530: Unexpected error when loading resource '/xsd/access
    _control-xacml-2.0-policy-schema-cd-04.xsd'.  Cause: The specified resource could not be loaded.  Action: Check logs for
    more detail
    at oracle.bpm.project.catalog.loaders.AbstractTypeLoader.buildTypes(AbstractTypeLoader.java:153)
    at oracle.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.buildType(ProjectCatalogComponentBundle.java
    :565)
    at oracle.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.buildTypeTree(ProjectCatalogComponentBundle.
    java:547)
    at oracle.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.loadTypeNames(ProjectCatalogComponentBundle.
    java:128)
    at oracle.bpm.type.TypeCache.reloadFromBundle(TypeCache.java:619)
    at oracle.bpm.type.TypeCache.reload(TypeCache.java:116)
    at oracle.bpm.type.TypeCache.sync(TypeCache.java:152)
    at oracle.bpm.type.DefaultComponentCatalog.sync(DefaultComponentCatalog.java:524)
    at oracle.bpm.fusion.soa.soabrowser.SOASchemaBrowserDialogImpl.showDialog(SOASchemaBrowserDialogImpl.java:72)
    at oracle.bpm.designer.ObjectContainerDialog.browseSOASchema(ObjectContainerDialog.java:401)
    at oracle.bpm.designer.ObjectContainerDialog.access$300(ObjectContainerDialog.java:67)
    at oracle.bpm.designer.ObjectContainerDialog$7.actionPerformed(ObjectContainerDialog.java:572)
    at oracle.bpm.ui.peer.swing.event.SwingActionListener.actionPerformed(SwingActionListener.java:30)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6267)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6032)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
    at java.awt.Dialog$1.run(Dialog.java:1046)
    at java.awt.Dialog$3.run(Dialog.java:1098)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1096)
    at java.awt.Component.show(Component.java:1563)
    at java.awt.Component.setVisible(Component.java:1515)
    at java.awt.Window.setVisible(Window.java:842)
    at java.awt.Dialog.setVisible(Dialog.java:986)
    at oracle.bpm.ui.peer.swing.SwingComponent.setVisible(SwingComponent.java:395)
    at oracle.bpm.ui.UiComponent.setVisible(UiComponent.java:838)
    at oracle.bpm.ui.OkCancelDialog.setVisible(OkCancelDialog.java:176)
    at oracle.bpm.designer.action.NewBpmObjectAction.newFuegoObject(NewBpmObjectAction.java:127)
    at oracle.bpm.designer.action.NewBpmObjectAction.doIt(NewBpmObjectAction.java:67)
    at oracle.bpm.designer.DesignerAction.run(DesignerAction.java:71)
    at oracle.bpm.ui.action.BaseAction.runWithSelection(BaseAction.java:297)
    at oracle.bpm.ui.action.BaseAction.runWithSelection(BaseAction.java:290)
    at oracle.bpm.fusion.ui.action.IdeMenuAdapter$1.handleEvent(IdeMenuAdapter.java:135)
    at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
    at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
    at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
    at java.awt.Component.processMouseEvent(Component.java:6267)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6032)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.NullPointerException
    at oracle.bpm.project.catalog.parser.xsd.ElementRootDef.buildType(ElementRootDef.java:88)
    at oracle.bpm.project.catalog.parser.xsd.SchemaElement.buildSubElements(SchemaElement.java:233)
    at oracle.bpm.project.catalog.parser.xsd.Schema.buildType(Schema.java:74)
    at oracle.bpm.project.catalog.loaders.impl.XsdTypeLoader.buildTypes(XsdTypeLoader.java:89)
    at oracle.bpm.project.catalog.loaders.impl.XsdTypeLoader.loadTypes(XsdTypeLoader.java:77)
    at oracle.bpm.project.catalog.loaders.AbstractTypeLoader.buildTypes(AbstractTypeLoader.java:141)
    ... 83 more

    Dear,
    I think  you have created GL as cost element.
    Now you have to assign it in OKB9 - Display View "Account assignment" : Overview
    In OKB9 specify weather this cost element give impact to cost center or profitability segment.
    You have a cost account defined in accounts determination (OBYC). But every cost account must have a cost object associated (internal order, cost center, and so on).
    You must decide what is the cost object to 'receive' the cost value on the account.
    Go to OKB9, insert the account (can be plant dependant) and the cost object, then repeat GR.
    Regards,
    R.Brahmankar

  • Serializing objects with arrays - JDBC

    Hello,
    Are there any known issues with serializing arrays into Blobs with JDBC?
    I have an object with a complex array. It’s basically name/value pairs, but the values
    can be arrays as well. The type of the values array can be of different types, i.e. string, Boolean, int, etc. These arrays are a unioned, and a discriminator identifies what type of array I have.
    Array (name, value.discriminator, value) where the value is also an array of some type.
    An example of some data would be.
    Name = ‘Employee Name’ values = { ‘Fred’} discriminator = StringType
    Name = ‘address’ values = { ‘addr1’, ‘addr2’, ‘addr3’} discriminator = StringType
    Name = ‘Insured’ values = {true} discriminator = booleanType
    Name = ‘Some_Int_values’ values = {1,2,3,4} discriminator = IntegerType
    Name = ‘SomeOther_Int_values’ values = {1,2,3,4} discriminator = IntegerType
    It does not need to be that complex… it might just be
    Name = ‘Employee Name’ values = { ‘Fred’} discriminator = StringType
    The issues I’m having is before I serialize the object and write it into a blob, I can repeat through the length of the outer array and print the value arrays. After I read the object for the blob, I cannot do this. It seems to have a problem identifying the discriminator type.
    Thanks!

    421780,
    Sounds like a good candidate for XML. Have you considered that? Have you seen Oracle's XML Technology Center?
    Good Luck,
    Avi.

  • Create lock object with fun command

    Hallo,
    Is it possible to create a lock object with the fun command? I tried to use:
    FUN ( ENQUEUE _<lockobject> , <interface> ).
    When I fill the importing parameters, execute the script and afterwards refresh the interace than the import parameters are empty. Is there a way to create a lock object with the fun command or at least with inline abap?
    regards,
    Wolfgang

    Hi Wolfgang,
    in general your way of including the FUN command was correct.
    The loss of import parameter values must have been caused by some other reason, not related to the invoke of enqueue. Maybe try it again.
    If, for any reason, using FUN is not possible, it's always an alternative to use ABAP. .... ENDABAP. with correct ABAP coding inbetween (e.g. CALL FUNCTION ...).
    Nevertheless regarding enqueue you need to consider, that the lock you set by running eCATT test scripts in this way, will last (only) as long as the session in which the function was called is active. Means, it lasts as long as you do not close the SECATT transaction (/n or similar) and not use commands like RESCON in your test script. Check your locks with transaction sm12.
    Be aware, that interfering with an applications lock handling and strategy might also harm running transactions or the data processed by this transactions. Usually there is no need to call the enqueue modules from a test.
    Best Regards
    Jens

  • BC4J: problems creating view object with multiple entity objects

    Hi,
    I working with a view object which contains two entity objects with parent-child relationship like this:
    ViewObject - ParentEntityObject - PId
    PAttribute
    CId (FK)
    (- ParentChildAssociation)
    - ChildEntityObject - CId
    - CAttribute
    The 'Read Only' and 'References' options are checked for the association in the view object.
    I'm creating a new row using this view object. The parent object should be created new and the child object already exists in the database, so I'm setting only the attributes of the parent object (including foreign key).
    After creating the row I display it in a jbo:DataTable and only those attributes coming from the parent object are displayed. The attributes of the child object are not set. After a commit all attributes appear.
    The problem is, that I want to display the new row with all attributes to the users BEFORE they commit.
    I tried to set the child attributes, but they are read only by definition and even when I unchecked the 'Read Only' option and set the attributes to 'Always Updateable' in the view object it is giving me
    JBO-27008: Attribute set for CAttribute in view object ViewObject failed.
    Is there a way to make all attributes of the child object visible in the view object without committing changes?
    (JDev 9.0.2.822)
    Any help would be appreciated.
    Regards,
    Christian

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

  • Create an object with the name passed in as a string argument to a method

    Hi,
    I am sorry if it's too trivial for this forum , but I am stuck with the following requirements.
    I have a method
    void abc(String object_name, String key, String value)
    method abc should first check if there exists in memory a hashmap object with the name passed in as argument object_name.
    If yes ..just put the key and value there.
    if not , then create the hashmap object called <object_name> and insert the key/value there.
    Can anybody help me in the first step i.e, how to check if an object exists with the name passed in and if not then create it.
    Will getInstance method be of any help?
    Thanks in advance for your response.
    -Sub-java

    Dear Cotton.m,
    Thanks for your suggesstion. I will remember that.
    But somehow I have a strong belief that you still need to consult dictionary for exact meaning of the words like "upset" , "frustration" etc. Not knowing something in a language , that too as a beginner, does not yield frustration, but increases curiosity. And people like petes1234 are there to diminish that appetite.
    To clarify above, let me compare jverd's reply to my doubt with petes1234's.
    jverd said it cannot be done and suggested a work around (It was perfect and worked for me) While petes1234 , having no work in hand probably, started analysis of newbies mistakes.
    jverd solved my problem by saying that it cannot be done. petes1234 acted as a worthless critic in my opinion and now joined cotton.m.
    Finally, this is a java forum and I do not want to discuss human characteristics here for sure.
    My apologies if I had a wrong concept or if I chose a wrong forum to ask, where people like petes1234 or Cotton.m show their geekdom by pointing out "shortfalls" rather than clearing that by perfect examples and words.
    Again take it easy and Cotton.m , please do not use this forum to figure out others' frustration but be a little more focussed on solving others "Java related" problems :)
    -Sub-java

  • Why r we allowed to create String objects with & without using new operator

    While creating any object, usage of the new operator is a must...but only for the string object we can create it with and also without new operator how is it possible to create an object without using new operator.

    Because Mr. (Dr.?) Gosling is a kindly soul who realizes that programmers have deadlines and, when he designed Java, was not so rigid or unbending as not to realize that from time to time, certain shortcuts are warranted, even in a relatively pure language such as Java. The direct String literal assignments are a shortcut over using the new operator making Java programming (and execution; there's also a performance benefit) more streamlined.
    So look not the gift horse in the mouth, but simply bask in the simplification and ease on the eyes and directly assign your little literals to your heart's content.

  • Creating View Object with different criteria

    Hi,
    I have a requirement to execute the following queries in the application logic. We have YEAR table with mileage rates with different effective dates. If the service date is greater than any of the existing effective dates we need to get the rate with that effective date. if the service date is less than the existing effective dates, then we have to get the rate with least effective date.
    SELECT mileage_rate, ... FROM year
    WHERE eff_date =  (SELECT MAX(eff_date) FROM   year WHERE  eff_date <= :bServiceDate)
    SELECT MILEAGE_RATE, .... FROM YEAR WHERE
    EFF_DATE =  (SELECT MIN(EFF_DATE) FROM YEAR)
    We have to execute the 1st query and if there is no matching records then we have to take the second query with min effective date. At present we are creating two view objects for the above scenario. Is there any possibility to create one view object with different criteria. What is the best solution to handle the above problem in ADF.
    Thanks and Regards,
    S R Prasad

    Well on the ViewObjectImpl you can fire the method getQueryHitCount() passing in the required ViewRowSetImpl. If you get the query hit count as 0, use can attached the other query and execute it.

  • How to create C201 object with BAPI in ECC6.0

    BAPI_ROUTING_CREATE can not create C201 object.Because its plnty is always set to 'N'.In C201, the plnty should be '2'

    Write a method
    public void MsgBox(String ex, Page pg,Object obj)
    string s = "<SCRIPT language='javascript'>alert('" + ex.Replace("\r\n", "\\n").Replace("'", "") + "'); </SCRIPT>";
    Type cstype = obj.GetType();
    ClientScriptManager cs = pg.ClientScript;
    cs.RegisterClientScriptBlock(cstype, s, s.ToString());
    and when you would like to use messagebox just use this line
    MsgBox("your message", this.Page, this);

  • How to create View Object with Multiple Updatable Entity Objects

    I want both the entities in the view object to support creating new rows but when i give create insert it allows to insert only on the parent and not the child. I found this link
    http://docs.oracle.com/cd/E21043_01/web.1111/b31974/bcadvvo.htm#CEGCAJCI which overrides the exiting classes. but i would like to do it declarative . Is there any other way to do it?
    I am using Jdeveloper 11g version 2.
    Thanks in advance,
    Rakesh

    But when i tried to add a new row it showed this error
    oracle.jbo.AttrValException: JBO-27014: Attribute LookupTypeId1 in FoundationModuleAM.VikLookupTypeBaseVO is required.
         at oracle.jbo.server.JboMandatoryAttributesValidator.validate(JboMandatoryAttributesValidator.java:224)
         at oracle.jbo.server.EntityDefImpl.validate(EntityDefImpl.java:3095)
         at oracle.jbo.server.EntityCache.validate(EntityCache.java:3599)
         at oracle.jbo.server.EntityImpl.validateEntity(EntityImpl.java:2285)
         at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:2464)
         at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4515)
         at oracle.insurance.viking.foundation.model.common.VikingDBTransactionImpl.validate(VikingDBTransactionImpl.java:46)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2008)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
         at oracle.insurance.viking.foundation.model.common.VikingDBTransactionImpl.commit(VikingDBTransactionImpl.java:37)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1415)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
         at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
         at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:112)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

  • How to create a grid with arrays and booleans?

    As part of a bigger project, I'm trying to create a sub-VI which will allow me to move a "cursor" in a 3x3 array.
    There should be 2 boolean inputs, one for moving down in the array, and the other for moving to the right. Once the edge of the array has been reached, the "cursor" will start back from the beginning.
    I have a vague idea of a 2 dimensional array with LED's. Once "down" has been pressed, the LED corresponding to (0,0) will turn off, turning (0,1) on. Same goes for the "right" button. When "down" is pressed at (0,2), the LED should turn off, and LED (0,0) should turn on.
    I'm sure it has something to do with initializing arrays, but i can't seem to find the right way to do it.
    Any kind of assistance is much appreciated. Thanks!
    Solved!
    Go to Solution.

    Maybe this will help.
    Oh, I just noticed that I could have done the "Clear True" outside of the inner case structure and some other things too, but oh well - it works.
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.
    Attachments:
    grid_png.vi ‏14 KB

Maybe you are looking for

  • How do you get your music from itunes onto a usb

    i want to copy the music on my itunes on my computer and put them onto a usb but it tells me access unavalible ?

  • Joining two fact tables

    Hi: We have to add two fact tables F1 AND F2 to an existing bmm. These fact tables have history tables F11 AND F22 and we have to use partition logic for this. We have multiple dimensions D1,D2,D3, D4,D5, D6, D7, D8. We have common dimension table D1

  • How to play Blu-Ray Discs

    Obviously no current Mac offers a stock Blu-Ray drive. But once you buy a 3rd Party Blu-Ray drive how do you go about actually playing movies? Will Apple's DVD Player play them? Do you need a 3rd party application?

  • Use of planning characteristics in APO DP

    I am using APO DP V5. In my planning object structure I have the following planning characteristics: - product - product group - customer Suppose I am extracting history data (based on despatches) from an attached ECC system. As I see things, I have

  • Short root-domain names

    Not long ago I posted a problem about login-failures with an IE browser. We discovered that this happens only when one installs a portal (even 6.1 version) in a domain which has only two or less characters in it's name, ie "aa.nl". Adding a sub-domai