Random element in a match collection

Greetings,
I need to select a random Order Number from a list in a page using VBA code. I get the list in a Match Collection successfully but I'm not sure how to specify a random element of the match collection. Any help would be appreciated.
Thx,
Mike

Try this:
Private Sub RSWVBAPage_afterPlay()
Dim rVal As Integer
'Following ensures values are truly random
Randomize
'Following generates a random value between 1 and 10
rVal = 1 + (Rnd * 10)
'Plug rVal into match collection
'Something like rswAPP.WriteToLog myMatch(rVal)
End Sub
I added a more advanced and full working example below. The following grabs random links from the empirix homepage and displays to the results log.
Private Sub RSWVBAPage_afterPlay()
Dim objReg As New RegExp
Dim objMatchCol As MatchCollection
Dim objMatch As Match
Dim doc As String
Dim rNumb As Integer
Randomize
rNumb = 1 + (Rnd * 10)
'Get the html
RSWApp.GetHtml doc
'set parameters for regular expression searching and matching
With objReg
  'find all occurances
  .Global = True
  .IgnoreCase = True
  'regular expression pattern specified here
  .Pattern = "a href=(.+?)asp"""
End With
Set objMatchCol = objReg.execute(doc)
Set objMatch = objMatchCol(rNumb)
RSWApp.WriteToLog objMatch.Value
Set objMatchCol = Nothing
Set objMatch = Nothing
End Sub
Hope this all helps.

Similar Messages

  • Help please! In InDesign DPS, my folio files are fine, but when previewing, random elements disappear?

    I have been working on these files now for a long time. All of a sudden, when I updated my Folio recently and previewed it, random elements disappeared from view. Images, text, buttons, all are just not visible at random. Please help me out as I need to get this published ASAP!
    I tried resetting my preferences, and I updated my DPS Tools... not sure what else to do.
    Thank you.

    See here for 'Preview on Device'

  • Org.xml.sax.SAXParseException: Document root element "taglib", must match D

    hi
    using tomcat 4
    and jdf1.5
    i am getting bellow error
    org.xml.sax.SAXParseException: Document root element "taglib", must match DOCTYPE root "null".

    Check your web.xml once again.

  • How to pick random element in 2D array

    This is the contents of my constructor. How is the best way to pick a random element in a 8x8 array and assign it "Q"?
         public DancingQueen()
              board = new char [BOARD_SIZE][BOARD_SIZE];
              for (int i = 0; i < board.length; i++)
                   for (int j = 0; j < board.length; j++)
                        board[i][j] = SPACE;
                   Random generator = new Random();
                   int r = generator.nextInt(8);
                   int c = generator.nextInt(8);     
                   board[r][c] = "Q";

    Better make that 'Q' instead of "Q". The rest is fine though.
    kind regards,
    Jos

  • ORA-19007: Schema and element do not match

    I've registered a schema with my DB provided in the Oracle 9i XML DataBase Developer's Guide. I've created a table that has one field of type XMLType and is associated with the registered schema. Now I am trying to insert an xml string - also directly from the Oracle's developer's guide site and am getting 'ORA-19007: Schema and element do not match'.
    These are the steps I took:
    1.begin dbms_xmlschema.registerSchema( 'http://www.oracle.com/po.xsd', getClobDocument ('po.xsd','XSDDIR'), TRUE, TRUE, FALSE, FALSE); end;
    2.create table po_tab(id number,po sys.XMLType ) xmltype column po XMLSCHEMA "http://www.oracle.com/po.xsd"element "PurchaseOrder";
    3.INSERT INTO PurchaseOrder VALUES (xmltype.createxml('<PurchaseOrder xmlns="http://www.oracle.com/po.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/po.xsd"><PONum>1001</PONum><Company>Oracle Corp</Company><Item><Part>9i Doc Set</Part><Price>2550</Price></Item></PurchaseOrder>'));
    this is the po.xsd used:
    <schema targetNamespace="http://www.oracle.com/PO.xsd"
    xmlns:po="http://www.oracle.com/PO.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <complexType name="PurchaseOrderType">
    <sequence>
    <element name="PONum" type="decimal"/>
    <element name="Company">
    <simpleType>
    <restriction base="string">
    <maxLength value="100"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Item" maxOccurs="1000">
    <complexType>
    <sequence>
    <element name="Part">
    <simpleType>
    <restriction base="string">
    <maxLength value="1000"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Price" type="float"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <element name="PurchaseOrder" type="po:PurchaseOrderType"/>
    </schema>
    thanks in advance

    Minor correction to the previous message, sorry: I've registered a schema with my DB provided in the
    Oracle 9i XML DataBase Developer's Guide. I've
    created a table that has one field of type XMLType
    and is associated with the registered schema. Now I
    am trying to insert an xml string - also directly
    from the Oracle's developer's guide site and am
    getting 'ORA-19007: Schema and element do not
    match'.
    These are the steps I took:
    1.begin dbms_xmlschema.registerSchema(
    'http://www.oracle.com/po.xsd', getClobDocument
    ('po.xsd','XSDDIR'), TRUE, TRUE, FALSE, FALSE); end;
    2.create table po_tab(id number,po sys.XMLType )
    xmltype column po XMLSCHEMA
    "http://www.oracle.com/po.xsd"element
    "PurchaseOrder";
    3.INSERT INTO PurchaseOrder VALUES
    (xmltype.createxml(1,'<PurchaseOrder
    xmlns="http://www.oracle.com/po.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/po.xsd"><PON
    m>1001</PONum><Company>Oracle
    Corp</Company><Item><Part>9i Doc
    Set</Part><Price>2550</Price></Item></PurchaseOrder>')
    this is the po.xsd used:
    <schema
    targetNamespace="http://www.oracle.com/PO.xsd"
    xmlns:po="http://www.oracle.com/PO.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <complexType name="PurchaseOrderType">
    <sequence>
    <element name="PONum" type="decimal"/>
    <element name="Company">
    <simpleType>
    <restriction base="string">
    <maxLength value="100"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Item" maxOccurs="1000">
    <complexType>
    <sequence>
    <element name="Part">
    <simpleType>
    <restriction base="string">
    <maxLength value="1000"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Price" type="float"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <element name="PurchaseOrder"
    type="po:PurchaseOrderType"/>
    </schema>
    thanks in advance

  • Still ORA-19007: Schema and element do not match Error

    Hi all,
    I'm new to XML and dealing with lots of information but I'm stuck with this error ORA-19007: Schema and element do not match. Read some forums and tried some possibitlities but none has solved this issue. I think this is related with some malformed headers definitions but I'm not sure, so any help will be much appreciated.
    Here's what I've done so far:
    This is the xml file - emp.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
    <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/emp.xsd">
         <employee team="Team Test">
              <id>1</id>
              <name>Nelson Branco</name>
              <comment>No Comments</comment>
         </employee>
    </employees>
    ...and this is the XSD file: emp.xsd:
    <?xml version="1.0" encoding="ISO-8859-15"?>
    <!-- edited with XMLSpy v2006 rel. 3 sp2 (http://www.altova.com) by Nelson Branco (Oracle Corp) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" xdb:storeVarrayAsTable="true">
         <xs:element name="comment" type="xs:string"/>
         <xs:element name="id" type="xs:string"/>
         <xs:element name="name" type="xs:string"/>
         <xs:complexType name="employeeType">
              <xs:sequence>
                   <xs:element ref="id"/>
                   <xs:element ref="name"/>
                   <xs:element ref="comment" minOccurs="0"/>
              </xs:sequence>
              <xs:attribute name="team" type="xs:string" use="optional"/>
         </xs:complexType>
         <xs:element name="employee" type="employeeType"/>
         <xs:element name="employees" xdb:defaultTable="EMPLOYEES">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="employee" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    1) Created folders
    declare
    ignore boolean;
    begin
    ignore := dbms_xdb.createFolder('/public/Emp');
    ignore := dbms_xdb.createFolder('/public/Emp/xsd');
    ignore := dbms_xdb.createFolder('/public/Emp/xml');
    commit ;
    end;
    2) Copied emp.xsd to /public/Emp/xsd in Win Explorer (via WebDAV connection)
    3) Registered the schema
    begin
    dbms_xmlschema.registerURI(schemaURL => 'http://xmlns.oracle.com/xdb/emp.xsd'
    ,schemaDocURI => '/public/Emp/xsd/emp.xsd'
    ,genTables => true
    commit ;
    end ;
    4) Copied the xml file to /public/Emp/xml. At this point I was expecting that the xml file was automatically uploaded to corresponding tables based on is content but it didn't happen. I didn't got any error also. When I issue:
    Select count(*) from employees
    ...or
    select y."name", y."team" from employees x, table(x.xmldata."employee") y
    ...got 0 rows returned
    5) So then created the table:
    create table emp_tab(
    id number,
    emp sys.XMLType
    xmltype column emp
    XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
    element "employee";
    6) And tried to insert one record based on the emp.xml:
    insert into emp_tab values (1,
    xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
    <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/emp.xsd">
         <employee team="Team Test">
              <id>1</id>
              <name>Nelson Branco</name>
              <comment>No Comments</comment>
         </employee>
    </employees>'));
    ...and that when I get ORA-19007: Schema and element do not match.
    Any help on this will be appreciated. Thx.

    SQL> set echo on
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/ as sysdba
    Enter password:
    Connected.
    SQL> set define on
    SQL> --
    SQL> define USERNAME = OTNTEST
    SQL> --
    SQL> def PASSWORD = OTNTEST
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user OTNTEST cascade
    User dropped.
    SQL> grant connect, resource to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant connect, resource to &USERNAME identified by &PASSWORD
    new   1: grant connect, resource to OTNTEST identified by OTNTEST
    Grant succeeded.
    SQL> grant create any directory, drop any directory to &USERNAME
      2  /
    old   1: grant create any directory, drop any directory to &USERNAME
    new   1: grant create any directory, drop any directory to OTNTEST
    Grant succeeded.
    SQL> grant alter session, create view to &USERNAME
      2  /
    old   1: grant alter session, create view to &USERNAME
    new   1: grant alter session, create view to OTNTEST
    Grant succeeded.
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user OTNTEST default tablespace USERS temporary tablespace TEMP
    User altered.
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> alter session set events ='19027 trace name context forever, level 0x800'
      2  /
    Session altered.
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://xmlns.oracle.com/xdb/emp.xsd';
      3    :schemaPath := '/public/testcase.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> create or replace directory XMLDIR as 'c:\xdb\otn'
      2  /
    Directory created.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="ISO-8859-15"?>
      5  <!-- edited with XMLSpy v2006 rel. 3 sp2 (http://www.altova.com) by Nelson Branco (Oracle Corp) -->
      6  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" xdb:store
    VarrayAsTable="true">
      7  <xs:element name="comment" type="xs:string"/>
      8  <xs:element name="id" type="xs:string"/>
      9  <xs:element name="name" type="xs:string"/>
    10  <xs:complexType name="employeeType">
    11  <xs:sequence>
    12  <xs:element ref="id"/>
    13  <xs:element ref="name"/>
    14  <xs:element ref="comment" minOccurs="0"/>
    15  </xs:sequence>
    16  <xs:attribute name="team" type="xs:string" use="optional"/>
    17  </xs:complexType>
    18  <xs:element name="employee" type="employeeType"/>
    19  <xs:element name="employees" xdb:defaultTable="EMPLOYEES">
    20  <xs:complexType>
    21  <xs:sequence>
    22  <xs:element ref="employee" maxOccurs="unbounded"/>
    23  </xs:sequence>
    24  </xs:complexType>
    25  </xs:element>
    26  </xs:schema>');
    27  begin
    28    if (dbms_xdb.existsResource(:schemaPath)) then
    29      dbms_xdb.deleteResource(:schemaPath);
    30    end if;
    31    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    32  end;
    33  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> var xmltext varchar2(4000)
    SQL> --
    SQL> begin
      2    :xmltext :=
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
      5  <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
    "http://xmlns.oracle.com/xdb/emp.xsd">
      6  <employee team="Team Test">
      7  <id>1</id>
      8  <name>Nelson Branco</name>
      9  <comment>No Comments</comment>
    10  </employee>
    11  </employees>';
    12  end;
    13  /
    PL/SQL procedure successfully completed.
    SQL> insert into EMPLOYEES values ( xmltype(:xmltext));
    1 row created.
    SQL> /
    1 row created.
    SQL> create table emp_tab
      2  (
      3     id number,
      4     emp sys.XMLType
      5  )
      6  xmltype column emp
      7  XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
      8  element "employee"
      9  /
    Table created.
    SQL> insert into EMP_TAB values ( 1, xmltype(:xmltext))
      2  /
    insert into EMP_TAB values ( 1, xmltype(:xmltext))
    ERROR at line 1:
    ORA-19040: Element employees does not match expected employee.
    SQL> drop table emp_tab
      2  /
    Table dropped.
    SQL> create table emp_tab
      2  (
      3     id number,
      4     emp sys.XMLType
      5  )
      6  xmltype column emp
      7  XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
      8  element "employees"
      9  /
    Table created.
    SQL> insert into EMP_TAB values ( 1, xmltype(:xmltext))
      2  /
    1 row created.
    SQL>

  • CREATING RANDOM ELEMENTS

    THE MAGIC TEXT INTIALIZED AS ABCD,AND I HAVE TO CREATE 50 RANDOM ELEMENTS FROM THAT TEXT..CAN ANYONE HELP ME
    Solved!
    Go to Solution.

    balbal207 wrote:
    i dont want to run n=50,i jst want  50 capital letters from abcd
    Generate a random number from 0 to 3.  Then use Array Index to pick your letter (A, B,C, and D stored in an array of strings).  Use autoindexing to create an array of strings for your characters.  You can then use Concatinate Strings to turn it all into a single string.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Can't download my iTunes Match collection of music anymore! PLEASE HELP! (Pics to prove!)

    Hi!
    There is probably a pretty easy fix for this situation - it's just I can't figure out what it is. Thanks in advance for your help.
    Here's my situation;
    1. I have a pretty large collection of music which I paid to match a couple years ago. My computer which I originally used to subscribe to iTunes match has died. No problem right? Since I have already subscribed to iTunes Match. But wait...
    2. I wanted to download my entire music collection onto another one of my computers just because I want to keep a back-up of all my music - just incase some time in the future I do NOT want to subscribe to iTunes Match anymore.
    3. While I was able to download most of my collection - a ton of songs were not downloaded. But instead, I see as pictured in [1] below, an exclaimation point in a circle to the left of the song, and a cloud icon with an exclaimation point in it under the "Match" column.
    4. I am still able to play these songs - and download them individually, but not without going through a 4 step process FOR EACH SONG!!!
    THERE MUST BE ANOTHER WAY to download all my music without going through this ridiculous process.
    [1] STEP ONE - Select the song I want to download. If I double click it - I first see this message below that says, "The song "the beatles - Beetles-Hey Jude" could not be used because the original file could not be found. Would you like to locate it?" So, since I no longer have the original file, I click "Cancel". BUT, that's exactly the moment when THE SONG STARTS PLAYING - and the the cloud icon with the exclaimation point turns to a could icon with an down-arrow letting me know that I can now download the file. (Go to step 2)
    [2]  BUT when I click that cloud icon with the down arrow, the cloud icon with the down arrow changes back to the cloud icon with the exclaimation point and then I get this message that says "The item was not added to iCloud because an error occurred." But the song seems to have downloaded in the right folder in my iTunes music folder. So, I hit OK, and I and I am still able to play this song. (Go to step 3)
    [3] So at this stage, I am not sure why there is the CLoud icon with the Exclaimation point in it next to the song. Because it was just downloaded from the cloud, into my iTunes folder. But never the less the cloud icon with the exclaimation point is still there. The only way I can now get rid of that is to right click and select - "Add to iCloud".
    [4] So now you see here below, STEP 4 - Hey Jude is downloaded, and matched to the cloud. THERE HAS GOT TO BE A BETTER WAY! Please help.

    I have the same problem!!!!PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    -I'm having some serious problems with installing iTunes on my laptop. I have searched and searched the internet and can not find any solution to my problem. I am receiving the error "itunes is not a valid win32 application' after the program finishes downloading. Sometimes however it will just stop in the middle of the download. I use a SONY VAIO VGN-NW25GF which was only purchased last year. It uses windows 7. I had trouble downloading itunes to begin with though eventually it worked, however since the new 10.1 update has been available ive been attempting to update it almost every time i use itunes. Each and every time it fails and i've had enough as i need to update my iphone software. I’ve since uninstalled both itunes and quicktime hoping it will reinstall properly. But nothing, the same problem is occurring and now i have no itunes program!
    I've tried all the solutions online about deleting browing history/temp folder and any itunessetup.exe/quicktimesetup.exe files and nothing works. I've also tried downloading using a different browser and still nothing. I’ve done a virus scan, disk cleanup and disk defragment and NOTHIGN is working. I'm starting to get quite frustrated as i need this program for my iphone. Any help would be greatly appreciated!! Thanks 

  • IOS7 randomly geotagging my photos in collections; Location service is off.

    I Have noticed when looking through my pictures under the photo>collection mode it would have some with a "location" under the time frame. When I select it, it shows the photo on a map where it was taken. I'm not sure how it's doing it because I have geotagging off (settings>privacy>location services>camera off) it seems to be randomly doing it. About 2-5% of my photos have locations with them. one just happened yesterday and I don't understand why. I was thinking maybe being on cell data and wifi made the difference  but I'm not sure.  Screen shots below.
    all the other photos just have dates but the recent one has a location and when you click on the location it show it on a map.
    any ideas?

    Lawrence please read my post to understand it.
    I send a message to locate my iphone, and after one week I received a mail saying that my message was delivered and that my iphone was located, when I go to mobile me to see where the iphone was, I can't view the iphone in my devices list.
    Because of this it is important that Apple shows you the last location of your iphone this way you could find or recover a stolen iphone more easily.
    About police, NSA, etc, etc, they already have the technology to view where you are at any time, also do you know that even if you turn off your mobile phone it is still sending signals? Have you seen any movie where everybody removes the battery of their phones so that no one can see their location or remotely turn on their phone to listen to their conversations? In phones like the iphone it is not possible to remove the battery this is why I bet that it keep sending signals all the time.
    Building more features to locate your iphone will only make it better for you because anyone with the right techonology can already view your location right now.

  • Randomly missing jobs from the collections

    In decentralized setup, 11.5.10 source  linked to ASCP 12.1.3.9.1, WIP
    jobs are randomly not collected into planning tables.  It seems the
    disconnect is between the view MRP_AP_WIP_JOB_SUPPLIES_V and staging table
    msc_st_supplies. Doesn't seem to be a Planning
    Manger issue either as MPS_NET_QUANTITY = 1 for the problem records. One observation is that the last update date of the 'missing' WIP jobs
    are around the same time the Refresh Collection Snapshot is running.

    Is this issue resolved? If not can you throw some more information along the below questions.
    Is the planning manager up and running? What about the firm planned flag? Is there any open quantity on job to be completed? Does this job show up on the view supply/demand screen on the txn instance?
    Thanks,
    Karthik

  • Xml disassembler failing with reason start element does not match end element

    Hi,
    I'am using a WCF-WSHttp adapter to send a very simple message to a WCF service from BizTalk. The service can return a response or throw a BusinessFault or a SystemFault.
    I get the responses and faults returned and captured most part of the time . But one in a hundred message fails with the below error when a BusinessFault or a SystemFault is thrown . They are SOAP faults
    There was a failure executing the response(receive) pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler"
    Send Port: "xy.Integration.customapplication.CustomService" URI: "https://xyz.xyz.co.xy/CustomService/CustomService.svc" Reason: Start element
    'nz/Faults/201' does not match end element 'Reason'.
    Line 1, position 677.
    I use the below Xpath for the Inbound BizTalk Message Body
    /*[local-name()='Fault']/*[local-name()='Detail' or local-name()='detail']/* | /*[not(local-name()='Fault')]
    My node encoding is Xml.
    I have enabled the Service Trace on the Biztalk server to capture the incoming message and noticed that the messages are not broken .
    Beleive this is one of the item that Microsoft has fixed for BizTalk 2009 in CU 1. But I couldnt notice a similar one for BizTalk 2010
    http://support2.microsoft.com/kb/981422
    Any tips would be very much appreciated.
    Thanks
    Suresh

    Could you post the XML message where this error occurs here please?
    Because that error usually occurs when you receive invalid XML. 
    Glenn Colpaert - MCTS BizTalk Server - Blog : http://blog.codit.eu

  • Can I select element number from table collection expression?

    Hi, I know I can use COLUMN_VALUE to select column values from table collection expression. Is there any way to select the number of the element as well? (with Oracle 11.2.0.1.0)
    CREATE OR REPLACE TYPE plch_numbers_nt IS TABLE OF NUMBER;
    DECLARE
       l_numbers   plch_numbers_nt
                      := plch_numbers_nt (10,
                                          20,
                                          30,
                                          40,
                                          50);
    BEGIN
       -- This would be nice...
       FOR rec IN (SELECT COLUMN_VALUE, VALUE_INDEX FROM TABLE (l_numbers))
       LOOP
          DBMS_OUTPUT.put_line (rec.COLUMN_VALUE, rec.VALUE_INDEX);
       END LOOP;
    END;
    /

    First of all, I would like to thank you all for your replies. I really appreciate your help.
    The problem I'm trying to solve is more complicated than what I have shown so far. Right now I'm trying to decompose the problem into smaller problems. Maybe I should show you the full problem and hope that I still get a reply.
    I have a spatial column with collections of geometries (SDO_GTYPE 2004) and I have a VARRAY column of objects. For each row, each geometry in the geometry collection has some information in one element in the VARRAY. So I have this table
    -- +----+------------------+-----------------------------------------------------------------------------------+
    -- | ID | GEOM_COLL        | GEO_INFO                                                                          |
    -- +----+------------------+-----------------------------------------------------------------------------------+
    -- | 98 | sdo_geom(2004)_1 | ((geo_info_1_1_1; geo_info_2_1_1; ...);(geo_info_1_1_2; geo_info_2_1_2; ...) ...) |
    -- +----+------------------+-----------------------------------------------------------------------------------+
    -- | 99 | sdo_geom(2004)_2 | ((geo_info_1_2_1; geo_info_2_2_1; ...);(geo_info_1_2_2; geo_info_2_2_2; ...) ...) |
    -- +----+------------------+-----------------------------------------------------------------------------------+
    --  ...and I need this
    -- +----+--------------------+----------------+----------------+-----+
    -- | ID | SDO_GEOM           | GEO_INFO_1     | GEO_INFO_2     | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- | 98 | sdo_geom(2001)_1_1 | geo_info_1_1_1 | geo_info_2_1_1 | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- | 98 | sdo_geom(2002)_1_2 | geo_info_1_1_2 | geo_info_2_1_2 | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- +----+--------------------+----------------+----------------+-----+
    -- | 99 | sdo_geom(2002)_2_1 | geo_info_1_2_1 | geo_info_2_2_1 | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- | 99 | sdo_geom(2001)_2_2 | geo_info_1_2_2 | geo_info_2_2_2 | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- ...I need a flat version of the original table, if you will. My original plan was to convert the VARRAY values to rows and extract the geometries into rows. Then join both using their ROWNUMs. But this does not work as i need numbers that start at 1 for each ID and I'm not sure if ROWNUM will give me the right order. Hence my question for consecutive element numbers. I have no idea how to do it with SQL. I'm working on a PL/SQL solution right now. Sample code follows. Sorry for the length of this post.
    CREATE OR REPLACE TYPE geo_info AS OBJECT (
      just INTEGER,
      txt  VARCHAR2 (255)
    CREATE OR REPLACE TYPE geo_info_array AS VARRAY (10000) OF geo_info;
    CREATE TABLE geometries (
      id NUMBER (38) PRIMARY KEY,
      geom_coll SDO_GEOMETRY,
      geo_info geo_info_array
    INSERT INTO geometries (id, geom_coll, geo_info) VALUES (
      98,
      sdo_geometry (2004, NULL, sdo_point_type (0, 0, 0),
                    sdo_elem_info_array (1, 1, 1, 3, 2, 1, 7, 1, 1, 9, 1, 1),
                    sdo_ordinate_array (5408562.081181, 5696027.239777, 5408563.398, 5696028.369, 5408568.192, 5696028.132, 5408562.643029, 5696038.558968, 5408565.328059, 5696027.0783)),
      geo_info_array (geo_info (7, '10.9'),
                      NULL,
                      geo_info (7, '0.0'),
                      geo_info (7, '-4.8-'))
    INSERT INTO geometries (id, geom_coll, geo_info) VALUES (
      99,
      sdo_geometry (2004, NULL, sdo_point_type (0, 0, 0),
                    sdo_elem_info_array (1, 2, 1, 5, 1, 1, 7, 2, 1, 11, 1, 1, 13, 1, 1),
                    sdo_ordinate_array (5408575.262, 5696017.841, 5408575.255, 5696017.341, 5408573.318578, 5696016.67559, 5408575.255, 5696017.341, 5408574.155, 5696017.357, 5408573.359578, 5696017.97359, 5408572.012251, 5696017.299678)),
      geo_info_array (NULL,
                      geo_info (7, '0.5'),
                      NULL,
                      geo_info (7, '0.0'),
                      geo_info (7, '-1.1-'))
    /

  • Element-dependent error on collections

    Hello,
         I either don't understand what element-dependent is meant to do, or
    there's a bug here.
    Let's say we have PC A.
    PC A has two collections, one for active objects, one for history objects.
    When an active object is complete, the active object gets removed from
    the active object collection and put in the history object collection.
    What I want to do is have both collections and their contained objects
    deleted when A is deleted. I tried setting both collection fields to
    element-dependent. However, when I do this, as soon as I remove an
    object from the active collection it gets deleted. Even if I add the
    object to the history collection first, it still gets deleted once
    removed from the active.
    My understanding of element-dependent is that it removes the contained
    objects in a collection when the PC is deleted. I don't see how this
    implies that the object should be deleted when it is a removed from a
    collection (and the PC is still active).
    Can someone please tell me if I'm misunderstanding something here, or if
    it's a bug in Kodo?
    class A {
         // element-dependent = "true"
         Collection active;
         // element-dependent = "true"
         Collection history;
         completeObject(Object o) {
              history.add(o);
              active.remove(o);
              // o is deleted immediately after this
    Setting the active to element-dependent = "false" fixes the deletion
    problem, so I know this is the cause. However, I want both collections
    to be deleted when the PC A is deleted. So, I need both to be
    element-dependent.
    Thanks

    Abe White wrote:
    It is fixed, and it is in the relase notes (last bullet under "Notable
    Changes", since it wasn't technically a bug).Unfortunately, as is stated in the release notes, "This analysis occurs
    on flush." That means after removing a dependent object from its List
    and adding it again to a different owning object's List, the
    PersistenceManager still regards it as deleted within the current
    transaction, probably until after commit. That means in the meantime I
    can't access that inadvertently and intermittently deleted object's
    fields. That's not very handy.

  • ROWNUM and order of elements in PL/SQL collection

    I have collection col of type tt_number is table of number.
    For example, values in collection are:
    col[1] = 123
    col[2] = -123
    col[3] = 999
    I'm running such query:
    select ROWNUM as "rn", column_value as "val"
    from table(col)
    Could I be sure, that my results always will look like:
    RN VAL
    1 123
    2 -123
    3 999
    Does ROWNUM equals to collection index?
    As I know, when querying tables, ROWNUM doesn't guarantee such things (unless querying "ordered by" subquery). But how about queries to collections?
    Regards, Dmitry Kuitskiy, 3-T Ltd, Kiev, Ukraine

    These Tom Kyte's threads can help you:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1193224283514449959::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:4447489221109
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1193224283514449959::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:3008276249843
    Rgds.

  • Form element doesn't match design view

    I just tried the new forms in Muse.
    After styling and moving the formfields around they don't stay where I put them in design view.
    See attached images from
    designview, preview and after publishing (to BC) in Chrome. (IE9 looks the same)

    Hi ePocket,
    It looks like you've found a bug that we missed, I've added it to our database.
    It seems to be caused by the use of a System Font in the submit button. To get around this, use a font that is not in the System font category.
    Sorry for the inconvenience

Maybe you are looking for