Select object-relational - Urgent

Hi all,
I created a object with a following command:
CREATE TYPE test AS OBJECT (
test1 varchar2(10)
,test2 varchar2(10));
Then, I created a table with a column of type:
create table text (text1 varchar2(10), text2 test);
How I can to access, for example, only test1?
Thanks.

SQL> CREATE TYPE test AS OBJECT (
  2  test1 varchar2(10)
  3  ,test2 varchar2(10))
  4  /
Type created.
SQL> create table text (text1 varchar2(10), text2 test);
Table created.
SQL> insert into text values ('text one', test('test one', 'test two'));
1 row created.
SQL> insert into text values ('text uno', test('test uno', 'test dos'));
1 row created.
SQL> commit;
Commit complete.
SQL> select t.text2.test1 just_test1 from text t;
JUST_TEST1
test one
test uno
SQL> This link might be useful :
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/expressions10a.htm#1033600

Similar Messages

  • Printing out results in case of object-relational table (Oracle)

    I have made a table with this structure:
    CREATE OR REPLACE TYPE Boat AS OBJECT(
    Name varchar2(30),
    Ident number,
    CREATE OR REPLACE TYPE Type_boats AS TABLE OF Boat;
    CREATE TABLE HOUSE(
    Name varchar2(40),
    MB Type_boats)
    NESTED TABLE MB store as P_Boat;
    INSERT INTO House VALUES ('Name',Type_boats(Boat('Boat1', 1)));
    I am using java to print out all the results by calling a procedure.
    CREATE OR REPLACE package House_boats
    PROCEDURE add(everything works here)
    PROCEDURE results_view;
    END House_boats;
    CREATE OR REPLACE Package.body House_boats AS
    PROCEDURE add(everything works here) AS LANGUAGE JAVA
    Name House_boats.add(...)
    PROCEDURE results_view AS LANGUAGE JAVA
    Name House_boats.resuts_view();
    END House_boats;
    However, I am not able to get Results.view working in case of object-relation table. This is how I do it in the situation of relational table.
    CALL House_boats.results_view();
    House_boats.java file which is loaded using LOADJAVA:
    import java.sql.*;
    import java io.*;
    public class House_boats {
    public static void results_view ()
       throws SQLException
       { String sql =
       "SELECT * from House";
       try { Connection conn = DriverManager.getConnection
    ("jdbc:default:connection:");
       PreparedStatement pstmt = conn.prepareStatement(sql);
       ResultSet rset = pstmt.executeQuery();
      printResults(rset);
      rset.close();
      pstmt.close();
       catch (SQLException e) {System.err.println(e.getMessage());
    static void printResults (ResultSet rset)
       throws SQLException { String buffer = "";
       try { ResultSetMetaData meta = rset.getMetaData();
       int cols = meta.getColumnCount(), rows = 0;
       for (int i = 1; i <= cols; i++)
       int size = meta.getPrecision(i);
       String label = meta.getColumnLabel(i);
       if (label.length() > size) size = label.length();
       while (label.length() < size) label += " ";
      buffer = buffer + label + " "; }
      buffer = buffer + "\n";
       while (rset.next()) {
      rows++;
       for (int i = 1; i <= cols; i++) {
       int size = meta.getPrecision(i);
       String label = meta.getColumnLabel(i);
       String value = rset.getString(i);
       if (label.length() > size) size = label.length();
       while (value.length() < size) value += " ";
      buffer = buffer + value + " ";  }
      buffer = buffer + "\n";   }
       if (rows == 0) buffer = "No data found!\n";
       System.out.println(buffer); }
       catch (SQLException e) {System.err.println(e.getMessage());}  }
    How do I print out the results correctly in my case of situation?
    Thank you in advance

    I have made a table with this structure:
    I am using java to print out all the results by calling a procedure.
    However, I am not able to get Results.view working in case of object-relation table. This is how I do it in the situation of relational table.
    How do I print out the results correctly in my case of situation?
    There are several things wrong with your code and methodology
    1. The code you posted won't even compile because there are several syntax issues.
    2. You are trying to use/test Java in the database BEFORE you get the code working outside the DB
    3. Your code is not using collections in JDBC properly
    I suggest that you use a different, proven approach to developing Java code for use in the DB
    1. Use SIMPLE examples and then build on them. In this case that means don't add collections to the example until ALL other aspects of the app work properly.
    2. Create and test the Java code OUTSIDE of the database. It is MUCH easier to work outside the database and there are many more tools to help you (e.g. NetBeans, debuggers, DBMS_OUTPUT windows, etc). Trying to debug Java code after you have already loaded it into the DB is too difficult. I'm not aware of anyone, even at the expert level, that develops that way.
    3. When using complex functionality like collections first read the Oracle documentation (JDBC Developer Guide and Java Developer's Guide). Those docs have examples that are known to work.
    http://docs.oracle.com/cd/B28359_01/java.111/b31225/chfive.htm
    http://docs.oracle.com/cd/E11882_01/java.112/e16548/oraarr.htm#sthref583
    The main issue with your example is #3 above; you are not using collections properly:
    String value = rset.getString(i);
    A collection is NOT a string so why would you expect that to work for a nested table?
    A collection needs to be treated like a collection. You can even treat the collection as a separate result set. Create your code outside the database and use the debugger in NetBeans (or other) on this replacement code for your 'printResults' method:
    static void printResults (ResultSet rset) throws SQLException {
        try {
           ResultSetMetaData meta = rset.getMetaData();
           while (rset.next()) {
               ResultSet rs = rset.getArray(2).getResultSet();
               rs.next();
               String ndx = rs.getString(1);
               Struct struct = (Struct) rs.getObject(2);
               System.out.println(struct.getSQLTypeName());
               Object [] oa = struct.getAttributes();
               for (int j = 0; j < oa.length; j++) {
                  System.out.println(oa[j]);
        } catch  (SQLException e) {
           System.err.println(e.getMessage());
    That code ONLY deals with column 2 which is the nested table. It gets that collection as a new resultset ('rs'). Then it gets the contents of that nested table as an array of objects and prints out the attributes of those objects so you can see them.
    Step through the above code in a debugger so you can SEE what is happening. NetBeans also lets you enter expressions such as 'rs' in an evaluation window so you can dynamically try the different methods to see what they do for you.
    Until you get you code working outside the database don't even bother trying to load it into the DB and create a Java stored procedure.
    Since your current issue has nothing to do with this forum I suggest that you mark this thread ANSWERED and repost it in the JDBC forum if you need further help with this issue.
    https://forums.oracle.com/community/developer/english/java/database_connectivity
    When you repost you can include a link to this current thread if you want. Once your Java code is actually working then try the Java Stored procedure examples in the Java Developer's Guide doc linked above.
    At the point you have any issues that relate to Java stored procedures then you should post them in the SQL and PL/SQL forum
    https://forums.oracle.com/community/developer/english/oracle_database/sql_and_pl_sql

  • Need help in Object-Relational Mapping

    I'm writing a simple two-tiered business application with Swing application on the client side and a DBMS on the server side. To make my client code more maintainable, I decided to create Business Objects instead of having my client accessing the database directly via SQL. For simplicity, I'm not using any features from the J2EE framework, and the Business Objects will be hosted on the client side, with one-to-one mapping to tables in the database. Since this is my first attempt in Object-Relational Mapping, I'm faced with the following problems:
    1. What kind of methods are appropriate for business objects? For example, if I have a Machine and Employee entity. A Machine is owned by an employee, and this is represented in the DB by storing the employee ID (not the name) as a foreign key in the Machine table. Let's say in the user interface I have a table that needs to display the list of Machines, but instead of displaying the owner employee's ID, I want to display the owner employee's name by doing a join select. Should the findMachines() method always perform a join select to get owner's name and store it in the Machine object which is returned, or should findMachines() simply return the owner's ID so the UI will need to make another SQL call (through the Employee object) to get the employee's name? The latter is more elegant, but would it be horribly inefficient if there are lots of machines to be displayed (and for each machine we make a separate select call to get the owner's name).

    Business objects should be separate from how they're persisted.
    When you say object-relational mapping, do you mean a tool like Hibernate? Or are you writing your own persistence layer using JDBC and SQL?
    I'd recommend that you read about the Data Access Object pattern and keep the persistence code out of the business objects themselves:
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
    url=http://www-106.ibm.com/developerworks/java/library/j-dao/

  • XPath query works with CLOB but not with object relational

    hi all
    i have the following queries,the XQuery work with all, but XPath queries work with XMLType CLOB and Binary XML, but they do not work with XMLType as Object relational,
    select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
    from xorm;
    select extract (object_value,'movies/directorfilms[director/dirname = "L.Cohen"]/films/film[position()=2]/t')
    from xorm;
    they shows this message
    ORA-00932: inconsistent datatypes: expectd SYSTEM.name683_COLL got CHAR
    thanks

    Hi Marco
    fisrt here is my RO
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL=>'http://......../ORMovies.xsd',
    SCHEMADOC=>bfilename('DB','Movies.xsd'),
    LOCAL =>false,
    GENTYPES=>true,
    GENTABLES=>FALSE,
    CSID=>nls_charset_id('AL32UTF8'));
    END;
    create table XORM of xmltype
    xmltype store as object relational
    XMLSCHEMA "http://......../ORMovies.xsd"
    ELEMENT "movies";
    INSERT INTO XORM
    VALUES(XMLType(BFILENAME('DB','ORMovies.xml'),nls_charset_id('AL32UTF8')));
    here the XQuery format that work fine with the OR
    A/D
    select XMLQuery ('for $a in movies/directorfilms/films/film
              where $a/studios/studio = "Gaumont"
              return $a'
         passing object_value
         returning CONTENT)"TitleX"
    from xorm;
    child element query
    select XMLQuery ('for $a in movies/directorfilms/director[dirname = "Feyder"]
              let $b:=$a/../films/film[position()=2]
              return $b/t'
         passing object_value
         returning CONTENT)"TitleX"
    from xorm;
    here is the XPath format which doesn't work
    select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
    from xorm;
    select extract (object_value,'movies/directorfilms[director/dirname = "Feyder"]/films/film[position()=2]/t')
    from xorm;
    by the way all queries work fine with the CLOB or Binary XML
    many thanx Marco

  • Bug: Front Panel objects relative position change when placing merge VI onto Block Diagram

    I've posted a bug report on LAVA, here:
    http://forums.lavag.org/Front-Panel-objects-relati​ve-position-change-when-placing-merge-VI-onto-Bloc​...
    If someone at NI can reproduce, can I please get a CAR #?
    Thanks,
    -Jim
    Solved!
    Go to Solution.

    Donovan B wrote:
    Hi Jim,
    After my previous post, I also saw this behavior, so I decided to do another test.  If there are no decorations in the VI set to “Merge VI” (“Place VI Contents” for LabVIEW 8.5 and later) the controls and indicators are still not selected when dropping the VI from the Functions palette.  I checked this behavior back to LabVIEW 7.1 and it is consistent throughout that controls and indicators are not selected.  (Consequently, so is the fact that when decorations are present they don’t maintain the relative position).
    I am not sure if this would be better suited as a CAR or product suggestion since it has been this way that long, but it does not appear to be related to the fact that decorations are present in the Merge VI.  It does seem strange that the decorations are selected though.  Looks like the best way to work around this is to drop the VI from the Controls palette.  Hopefully, it’s not too much of a hassle.
    Hi  Donovan,
    Thanks for checking in.
    >  I checked this behavior back to LabVIEW 7.1 and it
    is consistent throughout that controls and indicators are not
    selected.  (Consequently, so is the fact that when decorations are
    present they don’t maintain the relative position).
    This just means that not many people use this feature.  However, now that VIPM Professional makes it so easy to edit the palettes, I'm sure that others will start complaining that this doesn't work as they expect.
    > I am not sure if this would be better suited as a CAR or product suggestion
    since it has been this way that long, but it does not appear to be
    related to the fact that decorations are present in the Merge VI.
     Just look up the functional specifications for this feature and see if all objects are supposed to be selected.
    But seriously, is there a reason that only the FP decorations are selected?  Surely this would be documented somewhere, if there was a good reason for this current (IMO, buggy) behavior.
    > It
    does seem strange that the decorations are selected though.  Looks like
    the best way to work around this is to drop the VI from the Controls
    palette.  Hopefully, it’s not too much of a hassle.
    That's not a reasonably work-around, IMO.  It doesn't make sense to drop Block Diagram components onto the Front Panel.  For example, this bug affects the JKI State Machine.  It doesn't make sense to drop a State Machine onto the Front Panel.
    So, I'd file it as a CAR/bug, and then wait to see how LV R&D feels about it.  If they can find some valid reason for why Controls and Indicators shouldn't be selected, then that's fine (and hopefully someone will explain it to me).
    Thanks,
    -Jim

  • Query on object-relational data takes forever

    hello all
    i have a problem with a query performance... it seems like whenever i call a specific object function, the query executes very very slow. The results though are correct.
    let me explain what i do... I have some relational tables, and i recreate the schema into an object relational one. Then i insert data from relational tables to object tables. I follow this tutorial: [A Sample Application Using Object-Relational Features|http://download.oracle.com/docs/cd/B12037_01/appdev.101/b10799/adobjxmp.htm]
    these are the types that make up the transaction object table.
    CREATE OR REPLACE TYPE  TransactionItem_objtyp AS OBJECT
      transItemID   NUMBER,
      Quantity      NUMBER,
      iValue        NUMBER,
      item_ref      REF Item_objtyp
    CREATE TYPE TransactionItemList_ntabtyp AS TABLE OF TransactionItem_objtyp;
    CREATE OR REPLACE TYPE Transaction_objtyp AS OBJECT
      transID             NUMBER,
      cust_ref            REF Customer_objtyp,
      transTameio         NUMBER,
      transDateTime       DATE,
      isStoreCustomer     CHAR(1),
      store_ref           REF Store_objtyp,
      transItemList_ntab  TransactionItemList_ntabtyp,
      MAP MEMBER FUNCTION
        getTransID  RETURN NUMBER,
      MEMBER FUNCTION
        getTotalCost  RETURN NUMBER
    );the function that causes the query to run very slow (fetching 10 rows per sec in a query that should return 130.000 rows) is the getTotalCost:
    CREATE OR REPLACE TYPE BODY Transaction_objtyp AS
    MAP MEMBER FUNCTION getTransID RETURN NUMBER IS
    BEGIN
    RETURN transID;
    END;
    MEMBER FUNCTION getTotalCost RETURN NUMBER IS
    i       INTEGER;
    Total   NUMBER := 0;
    BEGIN
    IF(UTL_COLL.IS_LOCATOR(transItemList_ntab))
    THEN
    SELECT SUM(L.Quantity * L.iValue) INTO Total
    FROM TABLE(CAST(transItemList_ntab AS TransactionItemList_ntabtyp)) L;
    ELSE
    FOR i IN 1..SELF.transItemList_ntab.COUNT LOOP
    Total := Total + SELF.transItemList_ntab(i).Quantity * SELF.transItemList_ntab(i).iValue;
    END LOOP;
    END IF;
    RETURN ROUND(Total,2);
    END;
    END;the table transaction_objtab that contains the nested table is this
    CREATE TABLE Transaction_objtab OF Transaction_objtyp(
      PRIMARY KEY(transID),
      FOREIGN KEY(cust_ref) REFERENCING Customer_objtab,
      FOREIGN KEY(store_ref) REFERENCING Store_objtab)
      OBJECT IDENTIFIER IS PRIMARY KEY
      NESTED TABLE transItemList_ntab STORE AS TransItem_ntab (
        (PRIMARY KEY(transItemID))
        ORGANIZATION INDEX)
      RETURN AS LOCATOR
    ALTER TABLE TransItem_ntab ADD (SCOPE FOR (item_ref) IS Item_objtab);and this is how i insert the values into the transaction_objtab and the nested tables from the relational ones:
    INSERT INTO Transaction_objtab
    SELECT  t.transID,
            REF(c),
            t.transTameio,
            t.transDateTime,
            t.isStoreCustomer,
            REF(s),
            TransactionItemList_ntabtyp()
    FROM transactions t, Customer_objtab c, store_objtab s
    WHERE t.transCustomer = c.custCode AND t.transStore = s.storeCode;
    BEGIN
      FOR i IN (SELECT DISTINCT transID FROM transactionItems) LOOP
        INSERT INTO TABLE(  SELECT p.TransItemList_ntab
                            FROM Transaction_objtab p
                            WHERE p.transID = i.transID)
        SELECT transItemIDseq.nextval, t.Quantity, t.iValue, REF(i)
        FROM transactionItems t, item_objtab i
        WHERE t.transID = i.transID AND t.itemID = i.itemID;
      END LOOP;
    END;so whenever i use transaction_objtab t, t.getTotalCount() query takes for ever.
    is there anything i do wrong?
    sorry for this long post.
    thanks in advance

    So, how many transactions? How many items? There is a whole series of questions I would normally ask at this point, because performance tuning is - to a certain extent - largely a matter of rote. But there's a more fundamental issue.
    You are experiencing the problem with objects. They are cool enough when handling individual "things" but they suck when it comes to set-based processing. SQL and relational programming, on the other hand, excels at that sort of thing. So the question which has to asked is, why are you using objects for this project?
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Need help with creating B*Tree XMLIndex on a structured object-relational xmltype column

    The following is my schema:
    CREATE TABLE TST_AUDIT_TBL
       NOTE                  VARCHAR2(25 CHAR)     null,
       CHANGE_HISTORY        XMLTYPE               not null,
       CHANGE_HISTORY_EXT    XMLTYPE               null
    XMLTYPE COLUMN CHANGE_HISTORY STORE AS OBJECT RELATIONAL XMLSCHEMA "http://www.oracle.com/a.xsd" element "A"
    XMLTYPE COLUMN CHANGE_HISTORY_EXT STORE AS CLOB XMLSCHEMA "http://www.oracle.com/a.xsd" element "AX"
    XML Schema for the above is defined as follows:
    <schema targetNamespace="http://www.oracle.com/a.xsd"
            xmlns:a="http://www.oracle.com/a.xsd"
            xmlns="http://www.w3.org/2001/XMLSchema"  elementFormDefault="qualified">
        <complexType name="AuditExtType">
          <sequence>
            <element name="C" maxOccurs="unbounded" minOccurs="0">
              <complexType>
                <sequence>
                  <element type="string" name="CN"/>
                  <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                  <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                </sequence>
              </complexType>
            </element>
          </sequence>
        </complexType>
        <complexType name="AuditType">
          <sequence>
            <element type="string" name="M" maxOccurs="1" minOccurs="0"/>
            <element type="string" name="O"/>
            <element name="B" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="BC" minOccurs="1" maxOccurs="unbounded">
                    <complexType>
                      <sequence>
                        <element type="string" name="BN"/>
                        <element name="F" maxOccurs="unbounded" minOccurs="0">
                          <complexType>
                            <sequence>
                              <element type="string" name="FN"/>
                              <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                              <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                            </sequence>
                          </complexType>
                        </element>
                      </sequence>
                    </complexType> 
                  </element>
                </sequence>
              </complexType>
            </element>
            <element name="T" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="TL" minOccurs="1" maxOccurs="unbounded">
                    <complexType>
                      <sequence>
                        <element type="string" name="TN"/>
                        <element name="C" maxOccurs="unbounded" minOccurs="0">
                          <complexType>
                            <sequence>
                              <element type="string" name="CN"/>
                              <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                              <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                            </sequence>
                          </complexType>
                        </element>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
            <element name="I" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="K" maxOccurs="unbounded" minOccurs="0">
                    <complexType>
                      <sequence>
                        <element type="string" name="N"/>
                        <element type="string" name="V"/>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
          </sequence>
        </complexType>
        <element name="A" type="a:AuditType"/>
        <element name="AX" type="a:AuditExtType"/>
    </schema>
    I want to create a B*Tree XML Index on the above table for the following:
    1. CN
    2. TN
    in the above schema.
    Following the doc, this is what I am issuing:
    SQL> CREATE INDEX audt_audit_idx1 ON TST_AUDIT_TBL(CHANGE_HISTORY) INDEXTYPE IS XDB.XMLINDEX PARAMETERS ('XMLTABLE IXTAB
      2  XMLNAMESPACES(DEFAULT ''http://www.oracle.com/a.xsd''), ''/A'' COLUMNS COLUMN_NAME VARCHAR2(128) PATH ''A/T/TL/C/CN'' ');
    CREATE INDEX audt_audit_idx1 ON TST_AUDIT_TBL(CHANGE_HISTORY) INDEXTYPE IS XDB.XMLINDEX PARAMETERS ('XMLTABLE IXTAB
    ERROR at line 1:
    ORA-29958: fatal error occurred in the execution of ODCIINDEXCREATE routine
    ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name:
    (A)
    Not sure what is going wrong (and what would be a working xmlindex will look like?)

    Here goes...
    1) Schema registration
    begin
    dbms_xmlschema.registerSchema(
      schemaURL => 'http://www.oracle.com/a.xsd'
    , local     => true
    , genTypes  => true
    , genTables => false
    , enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
    , schemaDoc =>
    '<schema targetNamespace="http://www.oracle.com/a.xsd"
            xmlns:a="http://www.oracle.com/a.xsd"
            xmlns="http://www.w3.org/2001/XMLSchema"  elementFormDefault="qualified">
        <complexType name="AuditExtType">
          <sequence>
            <element name="C" maxOccurs="unbounded" minOccurs="0">
              <complexType>
                <sequence>
                  <element type="string" name="CN"/>
                  <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                  <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                </sequence>
              </complexType>
            </element>
          </sequence>
        </complexType>
        <complexType name="AuditType">
          <sequence>
            <element type="string" name="M" maxOccurs="1" minOccurs="0"/>
            <element type="string" name="O"/>
            <element name="B" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="BC" minOccurs="1" maxOccurs="unbounded">
                    <complexType>
                      <sequence>
                        <element type="string" name="BN"/>
                        <element name="F" maxOccurs="unbounded" minOccurs="0">
                          <complexType>
                            <sequence>
                              <element type="string" name="FN"/>
                              <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                              <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                            </sequence>
                          </complexType>
                        </element>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
            <element name="T" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="TL" minOccurs="1" maxOccurs="unbounded">
                    <complexType>
                      <sequence>
                        <element type="string" name="TN"/>
                        <element name="C" maxOccurs="unbounded" minOccurs="0">
                          <complexType>
                            <sequence>
                              <element type="string" name="CN"/>
                              <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                              <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                            </sequence>
                          </complexType>
                        </element>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
            <element name="I" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="K" maxOccurs="unbounded" minOccurs="0">
                    <complexType>
                      <sequence>
                        <element type="string" name="N"/>
                        <element type="string" name="V"/>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
          </sequence>
        </complexType>
        <element name="A" type="a:AuditType"/>
        <element name="AX" type="a:AuditExtType"/>
    </schema>'
    end;
    2) Table creation
    CREATE TABLE TST_AUDIT_TBL
       NOTE                  VARCHAR2(25 CHAR)     null,
       CHANGE_HISTORY        XMLTYPE               not null,
       CHANGE_HISTORY_EXT    XMLTYPE               null
    XMLTYPE COLUMN CHANGE_HISTORY STORE AS OBJECT RELATIONAL XMLSCHEMA "http://www.oracle.com/a.xsd" element "A"
    XMLTYPE COLUMN CHANGE_HISTORY_EXT STORE AS CLOB XMLSCHEMA "http://www.oracle.com/a.xsd" element "AX"
    3) Retrieving the nested table and column related to the target element :
    SQL> select dbms_xmlstorage_manage.xpath2TabColMapping(
      2           owner_name => 'DEV'
      3         , table_name => 'TST_AUDIT_TBL'
      4         , column_name => 'CHANGE_HISTORY'
      5         , xpath => '/A/T/TL/C/CN'
      6         , namespaces =>'default ''http://www.oracle.com/a.xsd'''
      7         )
      8  from dual;
    DBMS_XMLSTORAGE_MANAGE.XPATH2T
    <Result>
      <Mapping TableName="SYS_NTr0U7dPWyRu6OVvDN2f5HEg==" ColumnName="CN"/>
    </Result>
    4) Creating the index :
    SQL> create index CHANGE_HISTORY_IX1 on "SYS_NTr0U7dPWyRu6OVvDN2f5HEg==" ("CN");
    Index created
    If you're going to create multiple indexes like this, you could really benefit from renaming all the nested tables to meaningful names. That can be done via DBMS_XMLSTORAGE_MANAGE as well.

  • Benefits of object-relational

    Hi,
    I am having a problem with the object-relational features and JDBC.
    It seems that when I select objects from the database into my Java program, those objects can't be used after the Connection is returned to the pool.
    I want to read a bunch of objects from the database and cache them in my program. When I use those objects later, I reference their attributes using the accessor methods. If I have returned the Connection to the pool, I get a "Logical handle no longer valid" error.
    I'm using Oracle 9.0.1, getting a Connection from a OracleConnectionCacheImpl. I am using JPublisher to generate my Java classes, telling it to use the ORAData interface.
    The object features of Oracle looked really nice -- database objects are nicely materialized as Java objects in my program. But what good does it do to have all this fancy generated code if I need to create my own objects from the retrieved objects if I want to use them later?
    Am I missing something? Any comments or pointers?
    Here is the relevant portion of the code.
    try {
    DataSource ds = (DataSource)JndiClient.getConnectionPoolDataSource(poolAlias, "test1", "test1");
    conn = (OracleConnection)ds.getConnection();
    Statement stmt = conn.createStatement();
    rset = (OracleResultSet)stmt.executeQuery("SELECT VALUE(p) FROM process_types p");
    if (rset.next()) {
    np = (NapProcessType)rset.getORAData(1, NapProcessType.getORADataFactory());
    catch (Exception e) {
    System.err.println("Exception: " + e);
    e.printStackTrace();
    finally {
    // Free up resources.
    try {
    if (cs != null)
    cs.close();
    if (rset != null)
    rset.close();
    if (conn != null)
    conn.close();
    catch (SQLException ignore) {
    try {
    System.out.println("getPtName: " + np.getPtName()); // causes Exception
    catch (Exception e) {
    System.err.println("Exception: " + e);
    e.printStackTrace();
    Thanks.
    Mark

    Peter,
    Glad to see you took my advice and posted your question over here. Although I am a frequent user of the Oracle usenet groups, I have found that this is a much better place to get help with Spatial. My experiences suggest that the population of people using spatial is small--and of them the ones that really know alot are few and far between. I can only claim to be in the former group.
    As far as your problem goes--this is probably something you've already considered--is there a way to model the data such that you don't have to replicate the geometry components? Another option would be to handle the replication without using snapshots. Examples would be to export the data and then ftp/copy it to the target machines and import it. If you need real-time replication you could experiment with triggers that execute INSERTs/UPDATEs/DELETEs on the remote databases. This of course has its own issues--but you're going to end up with some sort of compromise no matter how you slice this.
    Of course you could use the relational model. I have never used it so I'm hard pressed to give any advice on it. As I posted on the usenet board, it is heading for desupport in 9i Release 2 according to the documentation available. So if you go relational you'll eventually have to migrate to object/relational. I'm not sure how automatic (or non-automatic) that process is. Hopefully someone on here will have some more concrete advice on that.
    Good luck.
    Matt.

  • Help with constraints on object relational tables

    Hi
    I am looking to create an object relational database with a check constraint on the relationships. For example:
    * I have table called person_tab which is a table of person_t type.
    * Person_t type is inherited by the manager_t type and the applicant_t type.
    * I have a second table called interview_tab of interview_t type.
    * The interview table has two columns (manager and appilcant) that are scope restrained to the person table.
    * I would also like to put check constraints on these columns to say:
    ----- Manager: check the person_number is less than 20000
    ----- Applicant: check the person_number is greater than 19999
    Can anyone tell me if this is possible and if so how can it be done?
    Thanks in advance
    Stephen

    You have circular dependencies (manager_t depends upon interview_list_t depends upon interview_t depends upon manager_t) which I don't think is a good idea. But then that's probably just my old-fashioned relational head baulking at this new-fangled OO way of looking at data models. However, my experience with using types and subtypes in Oracle does teach me that this is a complete pain in the neck, because it makes changing your Type definitions a very awkward process.
    am I right in saying I cannot use the check constraint?I think so. If the value range for ID is a property of being a Manager or an Applicant then properly that should be enforced by those types not by the Interview type. Then all that Interviews needs to worry about is that it gets instantiated with attributes of the correct Type.
    I've simplified your model a bit. To start with I'm going to create a single PERSONS table to store both managers and applicants...
    SQL> CREATE TYPE person_t AS OBJECT (
      2  personno NUMBER,
      3  surname VARCHAR2(30),
      4  forename VARCHAR2(30),
      5  dob DATE
      6  ) NOT FINAL;
      7  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE applicant_t UNDER person_t
      2  (qualifications varchar2(200))
      3  FINAL ;
      4  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE manager_t UNDER person_t
      2  (extension varchar2(5)) FINAL;
      3  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE interview_t AS OBJECT (
      2  interviewno NUMBER,
      3  idate DATE,
      4  itime NUMBER,
      5  interest NUMBER,
      6  is_made_by REF manager_t,
      7  attended_by REF applicant_t
      8  ) ;
      9  /
    Type created.
    SQL>
    SQL>
    SQL> CREATE TABLE persons OF person_t
      2  /
    Table created.
    SQL> CREATE TABLE interviews OF interview_t
      2  /
    Table created.
    SQL> Okay let's create some objects...
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  person_t;
      6     a_ref REF person_t;
      7  begin
      8     INSERT INTO persons p VALUES mgr
      9         RETURNING REF(p) INTO m_ref   ;
    10     INSERT INTO persons p VALUES app
    11         RETURNING REF(p) INTO a_ref   ;
    12     insert into interviews
    13     values (interview_t(1001, sysdate, 45, 5, TREAT(m_ref AS REF manager_t)
            , TREAT(a_ref AS REF applicant_t)));
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
      2  FROM interviews i
      3  /
    INTERVIEWNO IS_MADE_BY.SURNAME             ATTENDED_BY.SURNAME                 
           1001 RUNCITER                       CHIP                                
    SQL> Have we got integrity?
    SQL> rollback
      2  /
    Rollback complete.
    SQL>
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  person_t;
      6     a_ref REF person_t;
      7  begin
      8     INSERT INTO persons p VALUES mgr
      9         RETURNING REF(p) INTO m_ref   ;
    10     INSERT INTO persons p VALUES app
    11         RETURNING REF(p) INTO a_ref   ;
    12     insert into interviews
    13     values (interview_t(1001, sysdate, 45, 5, TREAT(a_ref AS REF manager_t)
             , TREAT(m_ref AS REF applicant_t)));
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
      2  FROM interviews i
      3  /
    INTERVIEWNO IS_MADE_BY.SURNAME             ATTENDED_BY.SURNAME                 
           1001                                                                    
    SQL> Kind of, but it's not very satisfactory. Let's use separate tables for MANAGERS and APPLICANTS...
    SQL> rollback
      2  /
    Rollback complete.
    SQL>
    SQL> CREATE TABLE managers OF manager_t
      2  /
    Table created.
    SQL>
    SQL> CREATE TABLE applicants OF applicant_t
      2  /
    Table created.
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  manager_t;
      6     a_ref REF applicant_t;
      7  begin
      8     INSERT INTO managers m VALUES mgr
      9         RETURNING REF(m) INTO m_ref   ;
    10     INSERT INTO applicants a VALUES app
    11         RETURNING REF(a) INTO a_ref   ;
    12     insert into interviews values (interview_t(1001, sysdate, 45, 5, m_ref, a_ref));
    13 
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
      2  FROM interviews i
      3  /
    INTERVIEWNO IS_MADE_BY.SURNAME             ATTENDED_BY.SURNAME                 
           1001 RUNCITER                       CHIP                                
    SQL> rollback
      2  /
    Rollback complete.
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  manager_t;
      6     a_ref REF applicant_t;
      7  begin
      8     INSERT INTO managers m VALUES mgr
      9         RETURNING REF(m) INTO m_ref   ;
    10     INSERT INTO applicants a VALUES app
    11         RETURNING REF(a) INTO a_ref   ;
    12     insert into interviews values (interview_t(1001, sysdate, 45, 5, a_ref, m_ref));
    13 
    14  end;
    15  /
       insert into interviews values (interview_t(1001, sysdate, 45, 5, a_ref, m_ref));
    ERROR at line 12:
    ORA-06550: line 12, column 69:
    PL/SQL: ORA-00932: inconsistent datatypes: expected REF APC.APPLICANT_T got REF
    APC.MANAGER_T
    ORA-06550: line 12, column 4:
    PL/SQL: SQL Statement ignored
    SQL>I hope that's useful to you.
    Cheers, APC
    Layout of SQL*Plus session tweaked for readability
    Message was edited by:
    APC

  • Oracle8i Object-Relational Features Problem(How to manipulate value by Member Method)

    sorry ~ I've never use 8iLite before, but I really want to figure out this !
    How can I create a Object Table , define Member Functions to change it's self
    attribute value ~
    for example :
    CREATE OR REPLACE TYPE HumanType AUTHID CURRENT_USER AS OBJECT (
    id NUMBER(3,0),
    name VARCHAR(4),
    age NUMBER(3,0),
    MEMBER FUNCTION getName RETURN VARCHAR2,
    MEMBER Procedure ageChange(c_age IN NUMBER)
    CREATE OR REPLACE TYPE BODY HumanType AS
    MEMBER FUNCTION getName RETURN VARCHAR2 IS
    BEGIN
    RETURN (SELF.name);
    END;
    MEMBER PROCEDURE ageChange(c_age IN NUMBER) IS
    age NUMBER;
    BEGIN
    age:=age+c_age;
    END;
    END;
    CREATE TABLE MAN OF HumanType;
    There is one record in MAN table.
    ID NAME AGE
    1 VIC 21
    in SQLplus I command
    SQL> SELECT m.agechange(5) FROM MAN m WHERE ID=1;
    THE ERROR MESSAGE IS :
    ERROR AT LINE1;
    ORA-06553: PLS-222: no function with name 'AGECHANGE' exists in this scope
    Q1.WHY CAN'T I USE the Member Method to Change the Value of itself ?
    Q2.Is there any other site can discuss Oracle Object-Relational Feature ?
    Thank you very much!

    hi,
    u r trying to return values but u r using procedure. that's first mistake
    then u declared variable called age in proc. from where does the age value comes. do u assume it will take column value. if so its wrong.
    start trying with simple examples
    ex: CREATE OR REPLACE TYPE HumanType AS OBJECT (
    id NUMBER(3,0),
    name VARCHAR(4),
    age NUMBER(3,0),
    MEMBER FUNCTION ageChange(c_age IN NUMBER) RETURN NUMBER
    CREATE OR REPLACE TYPE BODY HumanType AS
    MEMBER FUNCTION ageChange(c_age IN NUMBER) RETURN NUMBER IS
    age NUMBER;
    BEGIN
    age:=age+c_age;
    RETURN AGE;
    END;
    END;
    now try with ur sql stt
    since there is no value for variable age it will be treated as null and the result will be : null. it won't give error
    try this.
    if u have oracle 8 complete reference book refer pages 628 to 630.
    ie. Methods, creating metods.

  • Service template problem - Unable to perform the job because one or more of the selected objects are locked by another job - ID 2606

    Hello,
    I’ve finally managed to deploy my first guest cluster with a shared VHDX using a service template. 
    So, I now want to try and update my service template.  However, whenever I try to do anything with it, in the services section, I receive the error:
    Unable to perform the job because one or more of the selected objects are locked by another job.  To find out which job is locking the object, in the jobs view, group by status, and find the running or cancelling job for the object.  ID 2606
    Well I tried that and there doesn’t seem to be a job locking the object.  Both the cluster nodes appear to be up and running, and I can’t see a problem with it at all.  I tried running the following query in SQL:
    SELECT * FROM [VirtualManagerDB].[dbo].[tbl_VMM_Lock] where TaskID='Task_GUID'
    but all this gives me is an error that says - conversion failed when converting from a character string to uniqueidentifier msg 8169, level 16, State 2, Line 1
    I'm no SQL expert as you can probably tell, but I'd prefer not to deploy another service template in case this issue occurs again.
    Can anyone help?

    No one else had this?

  • Unable to remove a host from VMM - Error (2606) Unable to perform the job because one or more of the selected objects are locked by another job.

    I am unable to remove a host from my Virtual Machine Manager 2012 R2. I receive the following error:
    Error (2606)
    Unable to perform the job because one or more of the selected objects are locked by another job.
    Recommended Action
    To find out which job is locking the object, in the Jobs view, group by Status, and find the running or canceling job for the object. When the job is complete, try again.
    I have already tried running the following command in SQL Server Management Studio
    SELECT * FROM [VirtualManagerDB].[dbo].[tbl_VMM_Lock] where TaskID='Task_GUID'
    I received this error back:
    Msg 8169, Level 16, State 2, Line 1
    Conversion failed when converting from a character string to uniqueidentifier.
    I have also tried rebooting both the host and the Virtual Machine Manager Server.  After rebooting them both, I still receive the same error when trying to remove the host.
    Here are my server details
    VMM Server OS = Windows 2012 Standard
    VMM Version = 2012 R2 3.2.7510.0
    Host OS = Windows 2012 R2 Datacenter
    Host Agent Version = 3.2.75.10.0
    SQL Server OS = Windows 2012 Datacenter
    SQL Version = 2012 SP 1 (11.0.3000.0)

    Hi there,
    How many hosts are you managing with your VMM server?
    The locking job might be the background host refresher job. Did you see any jobs in the jobs view, when the host removal job failed?
    If there is no active jobs in the jobs view when this host removal job fails, can you please turn on the VMM tracing, retry the host removal, and paste back the traces for the failed job (search for exception and paste the whole stack)?
    Thanks!
    Cheng

  • Objects related to SD for excise invoice number range

    Dear gurus,
    Kindly provide the objects related to excise invoice number range  for SD module to be updated for  new financial year.
    [ for ex. j_1excloc ]
    Regards
    R.Rajendran

    provide the objects related to excise invoice number range for SD
    Following objects should be maintained in SNUM
    J_1IARE1:::::::ARE1 Doc No object based on Series Group
    J_1IARE3:::::::ARE3 Doc No object based on Series Group
    J_1IDEPINV:::::Excise Invoice Number for Depot Invoices
    J_1IEXCEXP:::::Export excise invoice number range
    J_1IEXCINV:::::Excise invoice number
    J_1IEXCLOC:::::Local excise invoice numebr range
    J_1IEXINEX:::::Excise invoice number for export
    J_1IINTPR2:::::Despatch serial number
    thanks
    G. Lakshmipathi

  • Script to apply a random CMYK swatches from a group of swatches to selected objects.

    I would like to write some scripts for randomising the allocation of swatches to adjacent object.
    Example:
    Imagine a map of Europe and all her nation states/territories. I have a User Defined Swatch Library. I can open the AI document it was made from as I understand from this thread that having the swatches as objects on the page makes them easier to be referenced in a script. 
    I want to iterate through the selected objects and randomly assign one of the colours in the swatch document as a fill to each object. It would be great if hidden swatches (they are all small rectangular 'colour chip' filled paths) on page were not included in the reference swatches randomly choosen from.
    Iterating the selected objects I can do, but not sure what references I need to use to create an array of swatches to randomly choose from.
    I see I can make an array of swatches using the general swatch group from Adobe's CreateSwatchGroup scripts:
    JS
    var docRef = app.documents.add(DocumentColorSpace.CMYK)
    // Create a new SwatchGroup
    var swatchGroup = docRef.swatchGroups.add();
    swatchGroup.name = "CreateSwatchGroup";
    // Get list of swatches in general swatch group
    var genSwatchGroup = docRef.swatchGroups[0];
    // Collect 5 random swatches from general swatch group and move to new group
    var i = 0;
    while (i < 5) {
              var swatches = genSwatchGroup.getAllSwatches();
              swatchCount = swatches.length;
              var swatchIndex = Math.round(Math.random() * (swatchCount - 1)); // 0-based index
              // New swatch group does not allow patterns or gradients
              if (swatches[swatchIndex].color.typename != "PatternColor" && swatches[swatchIndex].color.typename != "GradientColor") {
                        swatchGroup.addSwatch(swatches[swatchIndex]);
                        i++;
    // Updates swatch list with swatches moved to new swatch group
    swatches = swatchGroup.getAllSwatches();
    // [… etc etc]
    AS
    tell application "Adobe Illustrator"
    activate
              set docRef to make new document with properties {color space:CMYK}
    -- Create a new SwatchGroup
              set swatchGroupRef to make new swatchgroup in current document with properties {name:"CreateSwatchGroup"}
    -- Get list of swatches in general swatch group
              set genSwatchGroup to swatchgroup 1 of docRef
    -- Collect 5 random swatches from the general swatch group and move to new group
              set i to 0
              repeat until i is 5
                        set swatchesRef to get all swatches genSwatchGroup
                        set swatchCount to count every item in swatchesRef
                        set swatchIndex to random number from 1 to swatchCount
                        set currentSwatch to item swatchIndex of swatchesRef
      -- New swatch group does not allow patterns or gradients
                        if class of color of currentSwatch is not pattern color info and class of color of currentSwatch is not gradient color info then
      add swatch swatchGroupRef swatch currentSwatch
                                  set i to i + 1
                        end if
              end repeat
    -- [… etc etc]
    If someone can help me to create the Swatch Array object of swatches loaded from a seperate document (or unique layer) then I think I can work my way to changing the fill on the existing paths (the nations in my map of Europe example).
    Would be very cool if I could detect neighbooring paths (nieghbooring nations in my map of Europe example) make sure the colour being assigned is not within a certain hue/CMYK range of the random colour and if it is rechoose random colour. I have no idea how to perform the logic of determining neighbooring paths in an Illustartor script. Anybody?!
    I'd prefer Applescript for sake of readiblity and also I'm learning AS ATM. Plus I'm using Script Debugger.app (which is excellent) to work with AS and I can't seem to run JSX scripts from within Extend Script Toolkit 2 (perhaps I need to make my scripts point to Illustrator?)
    But Javascript is okay if someone has this covered already :-)

    I would like to write some scripts for randomising the allocation of swatches to adjacent object.
    Example:
    Imagine a map of Europe and all her nation states/territories. I have a User Defined Swatch Library. I can open the AI document it was made from as I understand from this thread that having the swatches as objects on the page makes them easier to be referenced in a script. 
    I want to iterate through the selected objects and randomly assign one of the colours in the swatch document as a fill to each object. It would be great if hidden swatches (they are all small rectangular 'colour chip' filled paths) on page were not included in the reference swatches randomly choosen from.
    Iterating the selected objects I can do, but not sure what references I need to use to create an array of swatches to randomly choose from.
    I see I can make an array of swatches using the general swatch group from Adobe's CreateSwatchGroup scripts:
    JS
    var docRef = app.documents.add(DocumentColorSpace.CMYK)
    // Create a new SwatchGroup
    var swatchGroup = docRef.swatchGroups.add();
    swatchGroup.name = "CreateSwatchGroup";
    // Get list of swatches in general swatch group
    var genSwatchGroup = docRef.swatchGroups[0];
    // Collect 5 random swatches from general swatch group and move to new group
    var i = 0;
    while (i < 5) {
              var swatches = genSwatchGroup.getAllSwatches();
              swatchCount = swatches.length;
              var swatchIndex = Math.round(Math.random() * (swatchCount - 1)); // 0-based index
              // New swatch group does not allow patterns or gradients
              if (swatches[swatchIndex].color.typename != "PatternColor" && swatches[swatchIndex].color.typename != "GradientColor") {
                        swatchGroup.addSwatch(swatches[swatchIndex]);
                        i++;
    // Updates swatch list with swatches moved to new swatch group
    swatches = swatchGroup.getAllSwatches();
    // [… etc etc]
    AS
    tell application "Adobe Illustrator"
    activate
              set docRef to make new document with properties {color space:CMYK}
    -- Create a new SwatchGroup
              set swatchGroupRef to make new swatchgroup in current document with properties {name:"CreateSwatchGroup"}
    -- Get list of swatches in general swatch group
              set genSwatchGroup to swatchgroup 1 of docRef
    -- Collect 5 random swatches from the general swatch group and move to new group
              set i to 0
              repeat until i is 5
                        set swatchesRef to get all swatches genSwatchGroup
                        set swatchCount to count every item in swatchesRef
                        set swatchIndex to random number from 1 to swatchCount
                        set currentSwatch to item swatchIndex of swatchesRef
      -- New swatch group does not allow patterns or gradients
                        if class of color of currentSwatch is not pattern color info and class of color of currentSwatch is not gradient color info then
      add swatch swatchGroupRef swatch currentSwatch
                                  set i to i + 1
                        end if
              end repeat
    -- [… etc etc]
    If someone can help me to create the Swatch Array object of swatches loaded from a seperate document (or unique layer) then I think I can work my way to changing the fill on the existing paths (the nations in my map of Europe example).
    Would be very cool if I could detect neighbooring paths (nieghbooring nations in my map of Europe example) make sure the colour being assigned is not within a certain hue/CMYK range of the random colour and if it is rechoose random colour. I have no idea how to perform the logic of determining neighbooring paths in an Illustartor script. Anybody?!
    I'd prefer Applescript for sake of readiblity and also I'm learning AS ATM. Plus I'm using Script Debugger.app (which is excellent) to work with AS and I can't seem to run JSX scripts from within Extend Script Toolkit 2 (perhaps I need to make my scripts point to Illustrator?)
    But Javascript is okay if someone has this covered already :-)

  • Indesign CS3: How to get the UID of the selected object?

    Hello,
    How can I get the UID of the selected object in an document?
    Thanks,
    Alois Blaimer

    Hello!
    I do not get it. Please give me some more hints.
    I only want to know if the selected object is a square and then the UID of the selected square.
    Thanks,
    Alois Blaimer

Maybe you are looking for