I Unable to bind a data provider to a TREE component

I know this should be easy, but I am trying to switch the following
myTree.dataProvider=event.result;
to
private var treeSource:XML;
treeSource = event.result;
myTree.dataProvider = treeSource
BUT, no matter what XML type I use I keep getting a compilation error 1118: Implicit coercion of a value with static type Object to a possibly unrelated type XML. Obviously I am missing something.

I have the solution.
var xmlList:XMLList = XML(event.result).node; 
myXmlList =
new XMLListCollection(xmlList);mainTree.dataProvider =
new XMLListCollection(xmlList);

Similar Messages

  • How to bind BubbleSeries data provider?

    Hi,
    I have a bubbleChart and multiple bubble series inside it. Initially I set the data provider of each of my series. Later, when I update the array collections (to which my bubble series's data provider was binded), bubble series' data provider is not updated.
    <mx:BubbleChart>
         <mx:BubbleSeries dataprovider={arr[0]}>
         </mx:BubbleSeries>
         <mx:BubbleSeries dataprovider={arr[1]}>
         </mx:BubbleSeries>
         <mx:BubbleSeries dataprovider={arr[2]}>
         </mx:BubbleSeries>
    </mx:BubbleChart>
    In actionscript, arr[0],arr[1] and arr[2] are updated. I want to see updated bubbleseries too, but in vain.
    I have marked arr as bindable.
    Please help..
    Thanks,
    Tanu

    Hi Tanu Jain,
    If you have no problem updating the values there itself.. then you can do one thing...But the way you are trying to update the things is however correct but it will not update the values for BubbleSeries. The reason is why because the each object and its properties in the expenses array collection are not Bindable as since the objects in the expenses array collection are generic objects.
    In order to make the objects bindable you can make use of a seperate class and make all the properties Bindable as needed so that you can acheive things you needed.
    And one more thing here to note is ...when you are assiging the dataProvider the first time in the for loop you are using the below line of code...
    bubbleSeries.dataProvider = expenses.getItemAt(i);
    But in the click handler you are reassigning the dataProvider as expenses = expenses1; by doing so you are assigning/adding new items to your expenses ArrayCollection but the binding you assigned to the bubbleSeries dataProvider are different items so there is no possibility of updating the values to the BubbleSeries by this approach so you should update the values there itself by making use of external Bindable class so that Bubble Series gets updated correctly.
    Actually I got this sorted out yesterday itself but you said as you are having some 200 - 300 series it is taking more time delay to get updated by reassigning the dataProvider by looping through the series as I suggested in my previous post. By updating the values there itself say if you have some 300 - 400 rows in your expenses ArrayCollection then you need to loop through all the rows(300 - 400 times)  and update all the properties within that Object.
    Any way try this example below which I am explaining above...hope this is less expensive when compared to reassigning the dataProvider again..
    <!-- Bindable class BubbleSeriesVO -->
    package
    [Bindable]
    public class BubbleSeriesVO
            public var Month:String;
            public var Profit:Number;
            public var Expenses:Number;
            public var amt:Number;
      public function BubbleSeriesVO()
    <!-- Application Source Code -->
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" minWidth="955" minHeight="600" creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import mx.charts.series.BubbleSeries;
                import mx.collections.ArrayCollection;
                /* [Bindable]
                public var expenses:ArrayCollection = new ArrayCollection([
                    {Month:"Jan", Profit:2000, Expenses:1500,amt:200},
                    {Month:"Feb", Profit:1000, Expenses:200,amt:340},
                    {Month:"Mar", Profit:1500, Expenses:500,amt:500}
                [Bindable]public var expenses:ArrayCollection;
                [Bindable]public var expenses1:ArrayCollection;
                /* [Bindable]
                public var expenses1:ArrayCollection = new ArrayCollection([
                    {Month:"Jan", Profit:2500, Expenses:1500,amt:1000},
                    {Month:"Feb", Profit:1500, Expenses:200,amt:2000},
                    {Month:"Mar", Profit:2000, Expenses:500,amt:1500}
                private function createExpensesCollection():void
                 //Creating expenses ArrayCollection
                 expenses = new ArrayCollection();
                 var bubbleVO:BubbleSeriesVO = new BubbleSeriesVO();
                 bubbleVO.Month = "Jan";
                 bubbleVO.Profit = 2000;
                 bubbleVO.Expenses = 1500;
                 bubbleVO.amt = 200;
                 expenses.addItem(bubbleVO);
                 bubbleVO = new BubbleSeriesVO();
                 bubbleVO.Month = "Feb";
                 bubbleVO.Profit = 1000;
                 bubbleVO.Expenses = 200;
                 bubbleVO.amt = 340;
                 expenses.addItem(bubbleVO);
                 bubbleVO = new BubbleSeriesVO();
                 bubbleVO.Month = "Mar";
                 bubbleVO.Profit = 1500;
                 bubbleVO.Expenses = 500;
                 bubbleVO.amt = 500;
                 expenses.addItem(bubbleVO);
                 //Creating expenses1 ArrayCollection
                 expenses1 = new ArrayCollection();
                 bubbleVO = new BubbleSeriesVO();
                 bubbleVO.Month = "Jan";
                 bubbleVO.Profit = 2500;
                 bubbleVO.Expenses = 1500;
                 bubbleVO.amt = 1000;
                 expenses1.addItem(bubbleVO);
                 bubbleVO = new BubbleSeriesVO();
                 bubbleVO.Month = "Feb";
                 bubbleVO.Profit = 1500;
                 bubbleVO.Expenses = 200;
                 bubbleVO.amt = 2000;
                 expenses1.addItem(bubbleVO);
                 bubbleVO = new BubbleSeriesVO();
                 bubbleVO.Month = "Mar";
                 bubbleVO.Profit = 2000;
                 bubbleVO.Expenses = 500;
                 bubbleVO.amt = 1500;
                 expenses1.addItem(bubbleVO);
                private function init():void
                 createExpensesCollection();
                    var bubbleSeriesColl:Array = new Array();
                    for(var i:int = 0; i < expenses.length; i++)
                        var bubbleSeries:BubbleSeries = new BubbleSeries();
                        bubbleSeries.xField = "Profit";
                        bubbleSeries.yField = "Expenses";
                        bubbleSeries.radiusField = "amt";
                        bubbleSeries.dataProvider = expenses.getItemAt(i);
                        bubbleSeriesColl.push(bubbleSeries);               
                    myChart.series = bubbleSeriesColl;               
                private function clickHandler():void
                    //expenses = expenses1;
                    for(var i:int = 0; i < expenses1.length; i++)
                     if(i >= expenses.length)
                      break;
                     (expenses.getItemAt(i) as BubbleSeriesVO).Month = (expenses1.getItemAt(i) as BubbleSeriesVO).Month;
                     (expenses.getItemAt(i) as BubbleSeriesVO).Profit = (expenses1.getItemAt(i) as BubbleSeriesVO).Profit;
                     (expenses.getItemAt(i) as BubbleSeriesVO).Expenses = (expenses1.getItemAt(i) as BubbleSeriesVO).Expenses;
                     (expenses.getItemAt(i) as BubbleSeriesVO).amt = (expenses1.getItemAt(i) as BubbleSeriesVO).amt;
                    expenses.refresh();
                    //updateBuubleSeries();
                private function updateBuubleSeries():void
                  for(var i:int = 0; i < myChart.series.length; i++)
                        myChart.series[i].dataProvider = expenses.getItemAt(i);
            ]]>
        </mx:Script>
        <mx:BubbleChart id="myChart" showDataTips="true">          
        </mx:BubbleChart>
        <mx:Button label="change Data" click="clickHandler()" />
    </mx:Application>
    Thanks,
    Bhasker

  • How to change the data provider of the tree with the selection of combobox

    This is my XML data in a file named `nodesAndStuff.xml`.
        <?xml version="1.0" encoding="utf-8"?>
        <root>
            <node label="One" />
            <node label="Two" />
            <node label="Three" />
            <node label="Four" />
            <node label="Five" />
            <node label="Six" />
            <node label="Seven" />
            <node label="Eight" />
            <node label="Nine" />
        </root>
    The component using this data source is an `XMLListCollection` which is bound to a spark `ComboBox` and the code for that is:
        <s:Application name="Spark_List_dataProvider_XML_test"
            xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/halo"
            initialize="init();">
        <fx:Script>
            <![CDATA[
                private function init():void {
                    xmlListColl.source = nodes.children();
    private function closeHandler(event:Event):void {
                    myLabel.text = "You selected: " +  ComboBox(event.target).selectedItem.label;                 myData.text = "Data: " +  ComboBox(event.target).selectedItem.data;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <fx:XML id="nodes" source="nodesAndStuff.xml" />
        </fx:Declarations>
        <mx:ComboBox id="cmbList" dataProvider="{ListXLC}" labelField="STOREVALUE"  close="closeHandler(event);"/>
         <s:dataProvider>
            <s:XMLListCollection id="xmlListColl" />
         </s:dataProvider>
    </mx:ComboBox>
    <mx:VBox width="250" color="0x000000">
                <mx:Text  width="200" color="blue" text="Select a type of credit card."/>
                <mx:Label id="myLabel" text="You selected:"/>
                <mx:Label id="myData" text="Data:"/>
            </mx:VBox> 
    <mx:Tree id="myTree" width="50%" height="100%" visible="false" />
    </s:Application>
    now another of my xml for example this is one.xml
    <?xml version="1.0" encoding="utf-8"?>
    <root>
        <node label="Eleven" />
        <node label="Twelve" />
        <node label="Thirteen" />
        <node label="Fourteen" />
        <node label="Fifteen" />
        <node label="Sixteen" />
        <node label="Seventeen" />
        <node label="Eightteen" />
        <node label="Nineteen" />
    </root>
    and another one is two.xml
    <?xml version="1.0" encoding="utf-8"?>
    <root>
        <node label="twety one" />
        <node label="twety two" />
        <node label="twety three" />
        <node label="twety four" />
        <node label="twety five" />
        <node label="twety six" />
        <node label="twety seven" />
        <node label="twety eight" />
        <node label="twety nine" />
    </root>
    Now I have added my tree just below the list and I have saved counting from 10 to 19 in `one.xml`, 20 to 29 in `two.xml` and so on in different XML file. I have no clue how to connect the XML containing counting from 10 to 19 as the single node in tree at the selection of label one in list and make its visiblity true.this all are dependent on combobox as on selection of item in combobox will lead to change the dataprovider of tree at runtime. i.e on selecting value one in combobox one.xml should be the data provider for tree control. Can anyone help me on this

    This is my XML data in a file named `nodesAndStuff.xml`.
        <?xml version="1.0" encoding="utf-8"?>
        <root>
            <node label="One" />
            <node label="Two" />
            <node label="Three" />
            <node label="Four" />
            <node label="Five" />
            <node label="Six" />
            <node label="Seven" />
            <node label="Eight" />
            <node label="Nine" />
        </root>
    The component using this data source is an `XMLListCollection` which is bound to a spark `ComboBox` and the code for that is:
        <s:Application name="Spark_List_dataProvider_XML_test"
            xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/halo"
            initialize="init();">
        <fx:Script>
            <![CDATA[
                private function init():void {
                    xmlListColl.source = nodes.children();
    private function closeHandler(event:Event):void {
                    myLabel.text = "You selected: " +  ComboBox(event.target).selectedItem.label;                 myData.text = "Data: " +  ComboBox(event.target).selectedItem.data;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <fx:XML id="nodes" source="nodesAndStuff.xml" />
        </fx:Declarations>
        <mx:ComboBox id="cmbList" dataProvider="{ListXLC}" labelField="STOREVALUE"  close="closeHandler(event);"/>
         <s:dataProvider>
            <s:XMLListCollection id="xmlListColl" />
         </s:dataProvider>
    </mx:ComboBox>
    <mx:VBox width="250" color="0x000000">
                <mx:Text  width="200" color="blue" text="Select a type of credit card."/>
                <mx:Label id="myLabel" text="You selected:"/>
                <mx:Label id="myData" text="Data:"/>
            </mx:VBox> 
    <mx:Tree id="myTree" width="50%" height="100%" visible="false" />
    </s:Application>
    now another of my xml for example this is one.xml
    <?xml version="1.0" encoding="utf-8"?>
    <root>
        <node label="Eleven" />
        <node label="Twelve" />
        <node label="Thirteen" />
        <node label="Fourteen" />
        <node label="Fifteen" />
        <node label="Sixteen" />
        <node label="Seventeen" />
        <node label="Eightteen" />
        <node label="Nineteen" />
    </root>
    and another one is two.xml
    <?xml version="1.0" encoding="utf-8"?>
    <root>
        <node label="twety one" />
        <node label="twety two" />
        <node label="twety three" />
        <node label="twety four" />
        <node label="twety five" />
        <node label="twety six" />
        <node label="twety seven" />
        <node label="twety eight" />
        <node label="twety nine" />
    </root>
    Now I have added my tree just below the list and I have saved counting from 10 to 19 in `one.xml`, 20 to 29 in `two.xml` and so on in different XML file. I have no clue how to connect the XML containing counting from 10 to 19 as the single node in tree at the selection of label one in list and make its visiblity true.this all are dependent on combobox as on selection of item in combobox will lead to change the dataprovider of tree at runtime. i.e on selecting value one in combobox one.xml should be the data provider for tree control. Can anyone help me on this

  • Need help coneverting data provider for inline fx:Component renderer for a datagrid

    I want to use an existing inline item renderer and point the hard coded data provider to an arraycollection, which comes from a database.
    At firt glance this looks easy, just change
    <fx:Declarations>
      <fx:Component id="inlineEditor">
       <mx:ComboBox >
        <mx:dataProvider>
         <fx:String></fx:String>
         <fx:String>AIG</fx:String>
         <fx:String>BHN</fx:String>
         <fx:String>FH</fx:String>
         <fx:String>LM</fx:String>
         <fx:String>SD</fx:String>
        </mx:dataProvider>
       </mx:ComboBox>
      </fx:Component>
    </fx:Declarations>
    TO
    <fx:Declarations>
      <fx:Component id="inlineEditor">
       <mx:ComboBox
        dataProvider="{outerDocument.wripAttachTypeAc}"
        labelField="WRIP_ATTACHED_FILE_TYPE_DESC">
       </mx:ComboBox>
      </fx:Component>
    </fx:Declarations>
    BUT that does not work the data grid produces the object.object value as theres no association to the labelField . Can anyone see what I am doing wrong. The datagrid entry is
    <mx:DataGridColumn dataField="Permit File"
              width="150"
              editorDataField="selectedItem"
              itemEditor="{inlineEditor}"/>

    Thanks Harui, but it doesn't help. If the border is set it will help, but the very big problem is the empty rows that appear at the end of the datagrid... I can't find a way of measuring correctly the height of the itemRenderers!
    I'll update this thread if I manage to do it.

  • Bind a data on a Tab set component

    Hello all people!
    Sorry for my dirty English!
    I've created a little intranet and would use a tab set component for a view of the data in mysql datasource!
    But if I put in the tab set the Property Sheet component and bind it to dataProvider, the init() of the java file not run!
    Can I use the propety sheet with tab set?
    If the response is "YES"; Why this don't work?
    Also I did use a page fragment for any tab?
    thank's a lot!

    I need more info. A property sheet is a container just like group or grid but its structured into layers: Property Sheet, then Property Sheet section, and then Property.
    Property's are ment to contain one or more components. There is a bug that you cannot drag/drop a component right on a property, you have to use the outline window to get them there).
    What exactly did you bind to in the property sheet component? Which part? What other fields are on the tabs?
    Please add a MessageGroup component to the page and re-run to see if you get any errors that may help..
    Thanks,
    Lark

  • ArrayCollection as Data Provider in Tree

    Hi,
         Does anybody know how to use ArrayCollection as a data provider in tree control as i have to access the data later from the database. I'm able to use XMLList as the data provider in the tree control but unable to use ArrayCollection as data provider.
    Please help me in this.
    Thanxs
    Gaurav

    Actually I was just thinking about something I am currently doing.  I am not sure if a tree control will accept a HierarchicalData object as its dataprovider but what you can do is create an array of associative arrays where one of the keys is called children.  This key called children would then point to another associative array.  It could nest down as far as you want but would look absolutely terrible.  I still think XMLList is the way to go but if you really dont want to do that you can try and work this.  Here is some sample of what a simple HierarchicalData object looks like:
    private var masterData:Array = [
                 { OrderId: 10248, CustomerId:"WILMK", EmployeeId:5, OrderDate:"1-Feb-2007",
                children:[
                            {ProductId:11, ProductName:"Quesbo Cabrales", UnitPrice:14, Quantity:12, Discount:0, Price:168},
                            {ProductId:42, ProductName:"Singaporean Hokkien Fried Mee", UnitPrice:9.8, Quantity:10, Discount:0, Price:98},
                            {ProductId:42, ProductName:"Mozzarella di Giovanni", UnitPrice:34.8, Quantity:5, Discount:0, Price:174}
                 { OrderId: 10249, CustomerId:"TRADH", EmployeeId:6, OrderDate:"3-Feb-2007",
                     children:[
                        {ProductId:51, ProductName:"Manjimup Dried Appels", UnitPrice:42.4, Quantity:40, Discount:0, Price:1696},
                        {ProductId:14, ProductName:"Tofu", UnitPrice:18.6, Quantity:9, Discount:0, Price:167.4}
                 { OrderId: 10250, CustomerId:"HANAR", EmployeeId:4, OrderDate:"4-Feb-2007",
                     children:[
                        {ProductId:51, ProductName:"Manjimup Dried Appels", UnitPrice:42.4, Quantity:35, Discount:0.15, Price:1261},
                        {ProductId:41, ProductName:"Jack's Clam Chowder", UnitPrice:7.7, Quantity:10, Discount:0, Price:77},
                        {ProductId:65, ProductName:"Hot pepper Sauce", UnitPrice:16.8, Quantity:10, Discount:0.15, Price:214.2}
    I got this example from a tutorial online explaining how to use nested AdvancedDataGrids but hopefully you can see my point on how you could nest the "nodes" in their parents children object.  It has to be called children because the data object is defaulted to look there. If you created this type of Array all you would have to do then is:
    var hierData:HierarchicalData = new HierarchicalData(masterData);

  • Populating a Tree data provider dynamically

    Hi,
    I have made an XMLLIstCollection as the data provider of a
    Tree control. I want to add the tree nodes dynamically. Now the
    problem is that I am able to add a node to the collection but not a
    sub-node. Can anybody plz tell me the way to do it?
    Thanks,
    Cheree

    I tried with your code the following mxml program:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="initApp()">
    <mx:Script>
    <![CDATA[
    import mx.collections.XMLListCollection;
    [Bindable]
    public var a:XMLList=new XMLList();
    [Bindable]
    public var xml:XML;
    [Bindable]
    public var coll:XMLListCollection=new XMLListCollection(a);
    public var xmlIn:String = "<node label='new'/>";
    public var xmlNode:XML=new XML(xmlIn);
    public function initApp():void{
    xml= <node label="sdf" isBranch="true"/>;
    coll.addItem(xml);
    xml=<node label="sdf">{xml}</node>;
    coll.addItem(xml);
    xml=<node label="goi">{a}</node>;
    //xml.node[0].subnode[0].appendChild(xmlNode);
    coll.addItemAt(xml,0);
    ]]>
    </mx:Script>
    <mx:Tree id="myTree" dataProvider="{coll}"
    labelField="@label"/>
    </mx:Application>
    If I uncomment the line that you suggested, I get the error :
    TypeError: Error #1010: A term is undefined and has no
    properties.
    at TestFile2/initApp()
    at TestFile2/___Application1_creationComplete()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/set initialized()
    at mx.managers::LayoutManager/::doPhasedInstantiation()
    at Function/
    http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/::callLaterDispatcher2()
    at mx.core::UIComponent/::callLaterDispatcher()

  • Binding menu model to a tree component

    Hi,
    I have generated menu models to all my unbounded task flows in my application and I want to display the menus as a tree in the side bar ...
    The hosted demo here tells that we can add the same menu model to a tree component...
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/pagehierarchy/page.jspx?_afrLoop=14156998585414802&_afrWindowMode=0&_afrWindowId=null
    Is it possible to bind a menu model to a Tree component? If possible...how to achieve this? If not...Is there any other way we can display the application menu in the form a tree...using the existing menu models?
    Edited by: user12747136 on Apr 13, 2010 12:26 AM

    Hi,
    I don't understand your question. You simply can use the tree and specify the MenuModel as its value and define the right detailStamp, like any kind of tree. Or was your question more general like how to use a tree?
    ~ Simon

  • Itunes was unable to load data provider from sync services! Please help!

    Whenever I try to sync my ipod to my computer it always says "itunes was unable to load data provider for sync services" and I have no idea what to do. People have said that you change the sync services folder to sync services_old but I dont have a sync services folder when I go into app data / roaming / apple computer PLEASE HELP!
    It still lets me sync my music and transfer music but the message wont go away.
    Specs:
    itunes is upto date
    iOS 6.1.3 on 4th generation ipod if that helps
    Windows 7

    In the course of your troubleshooting to date, have you also worked through the following document?
    iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert

  • Unable to create or update the Custom Data Provider WIS 10853

    Hi,
    I have created the universe in designer then I created QAAWS. In the web intelligence tool, clicked for new document and then chosen web services under other data sources. After giving webservices detailed, I encountered the following error.
    Error from Personal Datasource : Unable to create or update the Custom Data Provider: invalid information retrieved while trying to get the structure. (CDS 105109). (WIS 10853)
    Can anyone help abt this problem? I wud very thankful for them.

    Hi,
    Can you post the wsdl URL. It would be of great help if we could have a look at the wsdl schema. Not all schemas are supported at the moment and hence the error. You can have a look at the limitations section in the documentation guide.
    Regards
    Rahul

  • Unable to create or update the Excel Personal data provider in Web Rich

    Hi All,
    Iam getting the below error message ,when iam using Excel as personal data provider in WEBI Rich Client.
    "Unable to create or update the Excel Personal data provider in Web Rich Client Cannot open the workbook WIS:10872"
    Please suggest a solution ,it helps a lot..
    Regards
    Mahesh

    Hi,
    Was this issue resolved? I see this post has been marked answered but there wasn't any information on what it took to resolve the issue.
    We have our CMS and processing servers on Linux while our Scheduling servers are on Windows. The WEBI reports with external data providers fail to run on Infoview/ scheduler.
    We were told this is addressed in FP 3.6 but that is not the case. We installed FP 3.6 but still continue to see these errors. It required us to manually deploy the ExtensionFactoryService package for enabling the refresh of such reports on infoview/schedulers. It also involves placing of the file used [.xls/.txt] on the linux server on the PersonalDPFiles directory.
    No luck so far!!!
    Any help would be greatly appreciated!
    Thanks
    Avinash

  • Unable to use transactions with System.Data.OracleClient data provider

    I am using VS2008, System.Data.OracleClient, Oracle 10g, and ODAC 10.2.0.20. I haven't been able to get transactions to work. When I use 'connection.BeginTransaction()', the rollback doesn't work. When I use TransactionScope, the output parameter is always DBNull. Any ideas/comments?
    Here's the sample code:
    // #define ENABLE_TRANSACTION // failure is 'rollback not working'
    #define ENABLE_TRANSACTION_SCOPE // failure is 'no output parameter value'
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Text;
    using System.Data.OracleClient;
    #if ENABLE_TRANSACTION_SCOPE
    using System.Transactions;
    #endif
    namespace TestOracleTransaction
    class Program
    static void Main(string[] args)
    #if ENABLE_TRANSACTION_SCOPE
    using (TransactionScope scope = new TransactionScope())
    #endif
    string connectionString = "Data Source=ORADEV;User ID=user;Password=pwd";
    using (OracleConnection connection = new OracleConnection(connectionString))
    try
    connection.Open();
    #if ENABLE_TRANSACTION
    using (OracleTransaction transaction = connection.BeginTransaction())
    #endif
    try
    #if ENABLE_TRANSACTION_SCOPE
    if (Transaction.Current == null)
    throw new ArgumentException("no ambient transaction found for OracleClient");
    #endif
    OracleCommand command = connection.CreateCommand();
    #if ENABLE_TRANSACTION
    command.Transaction = transaction;
    #endif
    command.CommandType = CommandType.StoredProcedure;
    command.CommandText = "TIS.P_TIS_GATEWAY_INFO_ADD";
    OracleParameter param = command.CreateParameter();
    param.ParameterName = "p_gateway_id";
    param.Direction = ParameterDirection.Input;
    param.DbType = DbType.Int64;
    param.Value = 18;
    command.Parameters.Add(param);
    param = command.CreateParameter();
    param.ParameterName = "p_info_id";
    param.Direction = ParameterDirection.Input;
    param.DbType = DbType.Int64;
    param.Value = 79;
    command.Parameters.Add(param);
    param = command.CreateParameter();
    param.ParameterName = "p_user";
    param.Direction = ParameterDirection.Input;
    param.DbType = DbType.String;
    param.Value = "spms";
    command.Parameters.Add(param);
    param = command.CreateParameter();
    param.ParameterName = "p_gateway_info_id";
    param.Direction = ParameterDirection.Output;
    param.DbType = DbType.Int64;
    param.Size = sizeof(Int64);
    command.Parameters.Add(param);
    int count = command.ExecuteNonQuery();
    object value = command.Parameters["p_gateway_info_id"].Value;
    long id = (value == DBNull.Value) ? -1 : Convert.ToInt64(value);
    if (id < 0)
    // FAILURE - no output parameter value when TransactionScope enabled
    throw new ArgumentException("no return value");
    #if ENABLE_TRANSACTION
    // FAILURE - rollback doesn't work when Transaction enabled
    transaction.Rollback();
    #endif
    #if ENABLE_TRANSACTION_SCOPE
    scope.Complete();
    #endif
    catch (Exception ex)
    System.Console.WriteLine("ERROR: " + ex.Message);
    #if ENABLE_TRANSACTION
    transaction.Rollback();
    #endif
    finally
    if (connection.State == ConnectionState.Open)
    connection.Close();
    }

    Hi,
    First, this is not the place for questions with System.Data.OracleClient, this is the Oracle Data Provider for .NET forum. Having said that I went ahead and tested your code with some slight modifications because you did not provide the stored procedure information. I am assuming your stored procedure is doing some sort of DML since you are using transactions and attempting to commit and rollback.
    I tested the following with both Transaction scope and a local transaction object and it worked fine with System.Data.OracleClient. I provided the create table and stored procedure I used.
    Observations
    ========
    When using transaction scope, a distributed transactions was executed and the data was inserted and returned in the output variable.
    From console
    p1 value is Hello World
    From SQL Plus
    SQL> select * from foo;
    C1
    Hello World
    When using a local transaction, the DML was not inserted when calling rollback and when I changed it to commit, the row was inserted successfully.
    Maybe you can test the simple foo example below to see if it works for you. Maybe there is something going on in your SP that is causing your specific observations.
    The code I posted at this point is using local transaction and calling transaction.commit(), rollback is commented out. But I tested all scenarios and they worked as expected.
    HTH
    Jenny
    #define ENABLE_TRANSACTION // failure is 'rollback not working'
    //#define ENABLE_TRANSACTION_SCOPE // failure is 'no output parameter value'
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Text;
    using System.Data.OracleClient;
    #if ENABLE_TRANSACTION_SCOPE
    using System.Transactions;
    #endif
    create table foo (c1 varchar2(50));
    create or replace procedure getstr (p1 out varchar2) as
    begin
    insert into foo(c1) values ('Hello World') returning c1 into p1;
    end;
    namespace TestOracleTransaction
    class Program
    static void Main(string[] args)
    #if ENABLE_TRANSACTION_SCOPE
    using (TransactionScope scope = new TransactionScope())
    #endif
    string connectionString = "Data Source=orcl;User ID=scott;Password=tiger";
    using (OracleConnection connection = new OracleConnection(connectionString))
    try
    connection.Open();
    #if ENABLE_TRANSACTION
    using (OracleTransaction transaction = connection.BeginTransaction())
    #endif
    try
    #if ENABLE_TRANSACTION_SCOPE
    if (Transaction.Current == null)
    throw new ArgumentException("no ambient transaction found for OracleClient");
    #endif
    OracleCommand command = connection.CreateCommand();
    #if ENABLE_TRANSACTION
    command.Transaction = transaction;
    #endif
    command.CommandType = CommandType.StoredProcedure;
    command.CommandText = "SCOTT.GETSTR";
    OracleParameter param = command.CreateParameter();
    param.ParameterName = "p1";
    param.Direction = ParameterDirection.Output;
    param.DbType = DbType.AnsiString;
    param.Size = 20;
    command.Parameters.Add(param);
    int count = command.ExecuteNonQuery();
    object value = command.Parameters["p1"].Value;
    Console.WriteLine("p1 value is {0}",value.ToString());
    #if ENABLE_TRANSACTION
    // FAILURE - rollback doesn't work when Transaction enabled
    transaction.Commit();
    //transaction.Rollback();
    #endif
    #if ENABLE_TRANSACTION_SCOPE
    scope.Complete();
    #endif
    catch (Exception ex)
    System.Console.WriteLine("ERROR: " + ex.Message);
    #if ENABLE_TRANSACTION
    transaction.Rollback();
    #endif
    finally
    if (connection.State == ConnectionState.Open)
    connection.Close();
    }

  • Binding Text input value to chart data provider

    Hello, I am trying to develop a flex mobile application that generates the Chart.
    Is there any way to set the text input value as a chart data provider?????
    and if so, can you give me example?????

    Perhaps a stupid question but when you change your
    arraycollection do you do arraycollectioname.refresh()? If not,
    that should be your problem, without the refresh method your visual
    object will not update but your arraycollection will.

  • How can I use more than one Data Provider in my web Apps

    I am trying to use two different data provider in my web apps to run two different queries from the same table ,the data provider A is working correctly but when I attempt to run data provider B ,It display an error page ,here is the error message : Exception Details :javax.servlet.ServletEx ception
    java.lang.RuntimeException: java.sql.SQLException : Cannot connect .Both dataSourceName and url properties are null.

    Hi,
    You can use more than one data provider in your application. However if you have defined a dataprovider for a particular table already, and wish to bind a component, select the component and use its context menu to Bind to Data...

  • The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.

     We developed a SSIS Package to pull the data From Oracle source to Sql Server 2012. Here we used ADO.Net source to pull the records from Source but getting the below error after pulling some 40K records.
      [ADO NET Source [2]] Error: The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. 
     The PrimeOutput method on ADO NET Source returned error code 0xC02090F5. 
     The component returned a failure code when the pipeline engine called PrimeOutput(). 
    The meaning of the failure code is defined by the component, 
    but the error is fatal and the pipeline stopped executing. 
     There may be error messages posted before this with more 
    information about the failure.
    Anything that we can do to fix this?

    Hi,
      Tried both....
      * Having schema type as Nvarchar(max). - Getting the same error.
      * Instead of ADO.Net Source used OLEDB Source with driver as " Oracle Provide for OLE DB" Getting error as below.
           [OLE DB Source [478]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
           [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OLE DB Source returned error code 0xC0202009.  The component returned a failure
    code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the
    failure.
    Additional Info:
       * Here the Source task is getting failed not the conversion or destination task.
    Thanks,
    Loganathan A.

Maybe you are looking for

  • Facing problem in connection with OWB client

    Dear All Greetings!!! Im new to Datawarehouse building. I have installed OWB R1 at my own pc.I am facing problems in connecting OWB client..What exactly to put in Host name and Oracle Service name. i am logging in with the same system/password with n

  • Error Code 61499 after license update (FPGA)

    Hello, I am a fairly experienced FPGA module user.  I have LabVIEW 2009 installed (9.0.0) including the FPGA module on a 32-bit XP system.  Everything was working fine, and I had one particular FPGA project that had been built and run within the last

  • Queue names with [ ] in them...

    Ok, I have an assignment where I have to declare several queues with names that look like this... Subqueue[0], Subqueue[1]...etc. I tried to create one like this... Queue Subqueue[0] = new QueueAr( ); But compiler is yelling at me with an error that

  • Parsing Strings to Int, NumberFormatException ??

    Hey everyone... I am trying to convert some string to an int value.. Now this is what is exactly happening.. First i read some bytes into an array of bytes from a file. Then i use the toString() to convert it to a string. Once i get the string repres

  • ITune + Quicktime update question

    I am currently using an older version of Quicktime and iTunes because 3 months ago when i upgraded to Quicktime 7 and iTunes 6.03 all my MOV lost sound. So i am wondering if the problem has been fixed yet and it is safe for upgrade.   Windows XP