webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  .Net API 4.1.4 Dataset

    Posted Fri February 25, 2005 07:17 PM

    I’m trying to fill a dropdownlist with a DataSet using a specific query (for $a in input()/Item where $a/@Tipo=‘Producto’ return $a/). The error is System.EventArgs.

    Thanks
    Code:
    private void Page_Load(object sender, System.EventArgs e)
    {
    try
    {
    // create a TaminoDataAdapter object for the specified Tamino url and collection.
    TaminoDataAdapter adapter = new TaminoDataAdapter(dbUrl, collection);
    adapter.Behavior = TaminoAdapterBehavior.ReadOnly;

    dataset1 (adapter);

    }
    catch (Exception)
    {
    MsgBox1.alert(“Connection failed”+e.ToString());
    }
    }
    private void dataset1(TaminoDataAdapter adapter)
    {
    DataSet ds = new DataSet();
    TaminoQuery query = new TaminoQuery("for $a in input()/Item where $a/@Tipo=‘Producto’ return $a/
    ");
    int count = adapter.Fill(ds, query);

    DropDownList1.DataSource=ds;
    DropDownList1.DataMember=“Item”;
    DropDownList1.DataTextField=“Nombre”;
    DropDownList1.DataValueField=“Descripcion”;
    DropDownList1.DataBind();


    }


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 2.  RE: .Net API 4.1.4 Dataset

    Posted Sun February 27, 2005 06:39 PM

    Could you paste the stack trace and full error?

    Douglas Kelly,
    Sacramento, California


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 3.  RE: .Net API 4.1.4 Dataset

    Posted Mon February 28, 2005 02:22 PM

    Stack Trace Error Thanks…

    The IListSource does not contain a data source named ‘Item’.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: The IListSource does not contain a data source named ‘Item’.

    Source Error:


    Line 64: DropDownList1.DataTextField=“Nombre”;
    Line 65: DropDownList1.DataValueField=“Descripcion”;
    Line 66: DropDownList1.DataBind();
    Line 67: DataGrid1.DataSource=ds;
    Line 68:


    Source File: c:\inetpub\wwwroot\sendmail\formaprueba3.aspx.cs Line: 66

    Stack Trace:


    [HttpException (0x80004005): The IListSource does not contain a data source named ‘Item’.]
    System.Web.UI.DataSourceHelper.GetResolvedDataSource(Object dataSource, String dataMember)
    System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e)
    System.Web.UI.Control.DataBind()
    Sendmail.formaprueba3.dataset1(TaminoDataAdapter adapter) in c:\inetpub\wwwroot\sendmail\formaprueba3.aspx.cs:66
    Sendmail.formaprueba3.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\sendmail\formaprueba3.aspx.cs:45
    System.Web.UI.Control.OnLoad(EventArgs e)
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Page.ProcessRequestMain()


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 4.  RE: .Net API 4.1.4 Dataset

    Posted Mon February 28, 2005 06:24 PM

    Have you verified that your query returns any documents? The error is indicating that there is no “table” named “Item” that can be loaded into the dropdownlist.

    Maybe you could post the schema for this doctype and some sample data.

    Douglas Kelly,
    Sacramento, California


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods