Xmlgen.SetbindValue example

Can someone give me a code example of using xmlgen.setbindvalue and the proper format of the xmlgen.getxml() method.
Thanks

I'm not exactly sure what your problem is. You are able to bind the same value to another variable with a different name. If you won't know how many variables will appear in your select statement then you have a problem with how the XSU works. The XSU requires you know the structure of the SQL statement you pass it.
You could execute v_query using Native Dynamic SQL in 8i with a using clause containing your bind values. This should allow you to dynamically build your query with n amount of bind variables.
Also, you really should be using DBMS_XMLQUERY instead of XMLGEN. XMLGEN is there for backward compatibility, but DBMS_XMLQUERY is the latest and greatest XSU.
See the Oracle XML Portal website for more info at www.webspedite.com/oracle.
Regards,
Jason M Cohen

Similar Messages

  • Insert new column after get then XML

    Hello,
    I use Oracle 8i and SQL Utility. I want to do a query and after that, modify or insert the values of some elements.
    xmlgen.clearBindValues;
    xmlgen.setBindValue('vCity', vCity);
    xmlSQL := 'select name, depto from emp where city = :vCity';
    xmlString := xmlgen.getXML(xmlSQL);
    Now, I want to read each line and modify
    the name or depto values before create the
    XML file. How can I do this?
    Thanks,
    Arthur Rafael

    Again, it depends.
    If you just want to fix your query
    Create Table TABLE AS
    Select column1, to_char(column2) column2, column3 from Table1
    UNION
    Select column1, column2, column3 from Table2;If you want to fix Table1
    ALTER TABLE table1
      ADD( column2_varchar2 VARCHAR2(30) );
    UPDATE table1
       SET column2_varchar2 = to_char( column2 );
    ALTER TABLE table1
      DROP( column2 );
    ALTER TABLE table1
      RENAME COLUMN column2_varchar2 TO column2Taking a step back, though, why are you creating a new table that is the result of unioning two other tables? Is this a one-time data model change? Or is this part of some ongoing process?
    Justin

  • Xmlgen.setQueryDateFormat doesn't work.

    xmlgen.setQueryDateFormat(a) doesn't work.
    a for example: 'ddMMMyyyy' or 'MM/dd/yyyy HH:mm:ss'
    I looked all other Messages in this Forum, but I still get the
    error
    ORA-00932: inconsistent datatypes
    ORA-06512: at "SYS.XMLGEN", line 194
    ORA-06512: at line 1
    Do you have an suggestions?
    Thanks, Thomas.

    If you uninstall transmission you can reinstall it through application manager

  • Encoding in XMLGEN or DBMS_XMLQUERY

    Is it possible to set the encoding of the XML generated in
    either XMLGEN or DBMS_XMLQUERY package?
    We're using Oracle 8.1.5 so we're stuck with an older version of
    XSU.
    TIA

    So, if I have the following code segment:
    query := 'select *
    from test_table
    where col1 = :bind1
    and col2 = :bind2';
    queryCtx := DBMS_XMLQuery.newContext(query);
    DBMS_XMLQuery.setBindValue(queryCtx, 'bind1', parm1);
    DBMS_XMLQuery.setBindValue(queryCtx, 'bind2', parm2);
    result := DBMS_XMLQuery.getXML(queryCtx);
    DBMS_XMLQuery.closeContext(queryCtx);
    Are you saying that I need to call 'xmlgen.clearBindValues' before binding any variables? If so, wouldn't it make more sense to have the method in the DBMS_XMLQuery package also? Why use methods from two different packages to manipulate the data?
    Also, Mark, thanks for the link to the viewlet, but I think you probably meant to point to
    http://otn.oracle.com/tech/xml/htdocs/XDBDemo1.html
    or http://otn.oracle.com/tech/xml/htdocs/XDBDemo2.html
    am I correct?

  • Xmlgen.getxml Nested Cursors with LONG RAW and BLOB Data Types

    I am trying to use a nested cursor with xmlgen.getxml that has a long raw or blob column. In either case, it will not return to me any data in the xml document pertaining to that LONG RAW or BLOB column. If I do not use a nested cursor, it works fine.
    Example:
    SELECT xmlgen.getxml('SELECT x, CURSOR(SELECT y FROM y_tab WHERE y_tab.x_id = x_tab.x_id) y FROM x_tab') FROM dual;
    This will not produce the information I am after.
    However, simply running:
    SELECT xmlgen.getxml('SELECT y FROM y_tab WHERE y_tab.x_id = <somevalue>') FROM dual;
    Works???
    Any ideas out there? Does anyone know if DBMS_XMLQUERY has this limitation?
    Thanks,
    Brad

    It doesn't appear that I am able to attach the PDF files.  Can you supply your email (or I can supply mine) so I can send you the three files:
    1.)  A good PDF (manually extracted from our old application)
    2.)  Dump of the same PDF file (includes header/footer info)
    3.)  A partially fixed PDF file (but some of the pictures / pages are cut off - specifically pages 3,5,9,10,12,14)
    The way that we have tried to fix the file (in example 3 above) is the following:
    a.)  Find the First Occurrence of "%PDF-"
    b.)  Find the Last Occurrence of "%%EOF"
    c.)  if the first "%PDF-" is found AND the last "%%EOF" is found, then
       i.)  Remove all data before the first %PDF-
       ii.)  Remove all data after the last %%EOF
    Let me know if you need any other information.
    Thanks,
    Mike

  • XMLGEN package

    Is any one used xmlgen package, how is better than xsql.
    and from where i can load that.
    Thanks in Adv.

    Hi,
    You could still do it with SQL/XML functions :
    SQL> with sample_data as (
      2   select sysdate as start_date from dual union all
      3   select cast(null as date) from dual
      4  )
      5  select xmlserialize(document
      6          xmlelement("ROOT",
      7           xmlattributes('http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi"),
      8           xmlagg(
      9            xmlelement("START_DATE",
    10              xmlattributes(nvl2(start_date, null, 'true') as "xsi:nil"),
    11              start_date
    12            )
    13           )
    14          )
    15          as clob indent
    16         ) as result
    17  from sample_data
    18  ;
    RESULT
    <ROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <START_DATE>2011-03-08</START_DATE>
      <START_DATE xsi:nil="true"/>
    </ROOT>
    Is there a way using DBMS_XMLGEN that I generate the DETAILS tag seperately, then append HEADER tag.Possibly, but that depends on the SQL query you're using.
    Could you post a simplified example, with table structures and sample data, and the XML output you require.
    Database version would help too.
    Thanks.

  • XMLGEN & Stored Procs

    Could someone give an example of calling a function/stored proc contained in a package by the XML tools? Something like:
    xmlStr := xmlgen.getXML (MyPackage.StoredProc(vars));
    TIA!

    Steve,
    Yes, I figured that the return string needs to be a CLOB, although here I've actually depicted a function - which is fine - but I still need a quick example. What about stored procs with REF CURSORs?
    P.S. Good book!
    Thanks
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    What does MyPackage.StoredProc(vars) return in your environment? Is it returning the string representation of a query for which you want the XML ?
    Is "xmlStr" declared as a CLOB ?
    if so, you've already got the right syntax.<HR></BLOCKQUOTE>
    null

  • Just installed Firefox 4. It hangs when I open any website and type in, for example, an ID, or even just click on something, for example, "Compose", in my webmail site.

    Here's the detail of what happens.
    1. Turn on computer and then click on Firefox icon on desktop.
    2. Firefox opens. Everything looks OK. Mr Bunsen's graphic is working fine.
    3. Click on any webpage link. For example, a newspaper or an online webmail page. All looks OK until
    4. Click on anything or type anything, such as in ID in a box, and bingo, the top line of Firefox goes from dark blue to very pale blue and the computer is hung. You cannot get out of Firefox or get Firefox to work.
    5. Switch off computer.
    Is this perhaps due to a clash of Add-ons. I run Avast anti-virus. McAfee came with Firefox 4 and I did not reject it. Is it conflicting wth something in my system and causing it to hang?

    You can modify the pref <b>keyword.URL</b> on the <b>about:config</b> page to use Google's "I'm Feeling Lucky" or Google's "Browse By Name".
    * Google "I'm Feeling Lucky": http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=
    * Google "Browse by Name": http://www.google.com/search?ie=UTF-8&sourceid=navclient&gfns=1&q=
    * http://kb.mozillazine.org/keyword.URL
    * http://kb.mozillazine.org/Location_Bar_search

  • Some of my apps refuse to open. For example, google crome gives me the message that it quit unexpectedly and gives me the option to submit a report to no resolve. Does anyone have suggestions?

    Some of my apps refuse to open. For example, google crome gives me the message that it quit unexpectedly and gives me the option to submit a report to no resolve. Does anyone have suggestions?

    Welcome to the Apple community.
    Does anyone have suggestions?
    Trash the spyware (Chrome) and use Safari.

  • How can I change the background of a running webpage on my own. Example Facebook I want to change its backround color from white to black just in my view not for all

    How can I change the background of a running webpage on my own. Example Facebook I want to change its background color from white to black just in my view, not for all. Cause I really hate some site with white background because as I read for an hour it aches my eyes but not on those with darker background color.

    You can use the NoSquint extension to set font sizes (text/page zoom) and text colors on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • TS1814 Most of the songs on my iPod Classic no longer dshow up on iTunes on my laptop.  I deleted iTunes & installed the latest version but this did not change anything.  For example on 1 playlist I have 66 songs but only 1 shows on the iTunes screen.  Th

    Most of the songs on my iPod Classic no longer show up on iTunes on my laptop.  I deleted iTunes & installed the latest version but this did not change anything.  For example on 1 playlist I have 66 songs but only 1 shows on the iTunes screen.  Thanks you for any help.

    See Empty/corrupt iTunes library after upgrade/crash or
    Recover your iTunes library from your iPod or iOS device.
    tt2

  • When previewing images by clicking on the thumbnail in an Event for example, I've been finding that many images preview in a 'zoomed in' way so only a small part of the photos is previewed in a highly magnified view.

    When previewing images by clicking on the thumbnail in an Event for example, I've been finding that many images preview in a 'zoomed in' way so only a small part of the photos is previewed in a highly magnified view.
    Initially I could find no cause. Then I tried right click - Edit and on the affected images, always get this warning:
    "Image Cannot Be Edited - This photo was previously edited with another application or with an early version of Iphoto. Duplicate this photo to edit it." and a "Duplicate To Edit" Button is displayed. 
    The external Editor defined for iPhoto is Adobe Photoshop Elements.
    Now, I reckon the MUST be others out there affected by this same apparent Preview bug, yet my searches have not revealed any answers.  Also seems impossible to find a contact number for adobe???
    Thanks

    Start '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Firefox in Safe Mode]''' {web Link} by holding down the '''<Shift ''(Mac Options)'' >''' key, and then starting Firefox. Is the problem still there?

  • Trying to create a simple example. Need Help!

    I'm trying to create a very simlpe examlpe using Swing components to illustrate a MVC architecture.
    I have a JFrame containing a JTree and a JButton.
    What I'd like to happen is when I click the JButton the JTree model is changed in some fashion and the the view is refreshed due to the models change.
    If anyone out there has a simple example of any MVC architecture involving Swing components I'd love to see it.
    Thx

    Sure, look at any of the Sun tutorials. For example, look in your API documentation for JTree; it has a link to a tutorial about how to use JTree.

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • Can not find location of method in Flash example

    The issue that I am having is that I have search high and low to find where the method "flashmo_graphic()" is defined in the example that can be found here:
    http://www.flashmo.com/preview/flashmo_158_heart_effect
    I also attached folder.  There is a "caurina.transitions.*;"  folder being imported, it is attached.  Anyways, you will notice that there is only 1  action script frame and in it around midway there is the code:
    function flashmo_create(e:Event):void
        var mc:MovieClip = new flashmo_graphic();
        mc.gotoAndStop( Math.floor( flashmo_group.numChildren % mc.totalFrames ) + 1 );
    The issue that I am having is finding out what flashmo_graphic() is.  Can anyone tell me what this method is and better yet how I would find out for myself?
    Thanks,
    Brian

    var mc:MovieClip = new flashmo_graphic();
    This is the script to add a movieclip to the stage.
    Go to library.Right click on the first symbol(flashmo graphic) and select linkage you see a pop up with some properties of the symbol.
    In the class you can see  flashmo_graphic  which is the linkage name of the symbol.

Maybe you are looking for

  • 4.3 upgrade

    wow after reading all the problems with the 4.3 up-grade i am lucky that i only have a not authorized message on my computer that is already authorized. I have noticed however that my ipod takes a long time to shut down that it didnt do before i did

  • Problems with plugging my power chord in to my dv6700 notebook

    This problem has been going on for a while and im just noticing that it is getting worse. when i plug in my power chord into my notebook i have to jiggle it to make the Blue LED go on to let the user know that power is getting into the battery. It ha

  • ORA-20500+ ORA-02055+ORA-02068+ORA-03113

    i got this error in my front end .....any idea what might be the reason? Failed: ORA-20500: ORA-20500: ORA-20500: ORA-20500: ORA-02055: distributed update operation failed; rollback required ORA-02068: following severe error from MUDR2SEBL(db_link na

  • Solaris 8 (intel) installation

    I have not been successful to install Solaris 8 (Intel version).I am installing from the (Install CD) and I get to the Solaris Boot screen that says: Select one of the identified devices to boot the Solaris Kernel and choose F2 to continue. Solaris i

  • Is this phone work in Egypt

    Hi, i want to ask if the *iphone* is working in egypt (cairo)or not. one friend of my friend told me that it will begin working from January 2008, is it right. what is the address of Apple company in cairo (Egypt) and the phone number if it is possib