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
Expand all | Collapse all

Problem filling dataset with TaminoDataAdapter

  • 1.  Problem filling dataset with TaminoDataAdapter

    Posted Tue August 16, 2005 05:02 PM

    Hi,

    I am using a TaminoDataAdapter to fill a dataset and display the content for editing in a datagrid. It was working fine on my developing server, but since I moved the asp.net application to a different server there is the error:

    TANDSE0003: DataSet schema and Tamino query result do not match.

    when I try to fill the dataset for the first time.

    The URI and collection information for the TaminoDatabase are correct, since the login to my site successfully accesses the same data as the dataset above with a TaminoConnection

    I am confused, since the exact same code worked on the other server and the login still works on the new server, but not the dataset. I did not change anything else, so I guess the code should work regardless of the IIS server hosting it…So what could be the problem?

    Thanks in advance,

    Yves Pauchard

    Error

    TANDSE0003: DataSet schema and Tamino query result do not match.

    at SoftwareAG.Tamino.Api.TaminoException.Throw(String name) at SoftwareAG.Tamino.Api.DataAdapter.DataSetXmlHandler.ThrowExceptionIfSchemaMismatch(Int32 count) at SoftwareAG.Tamino.Api.DataAdapter.DataSetXmlHandler.PerformQuery() at SoftwareAG.Tamino.Api.DataAdapter.TaminoDataAdapter.Fill(DataSet ds) at SoftwareAG.Tamino.Api.DataAdapter.TaminoDataAdapter.Fill(DataSet ds, TaminoQuery query) at LearningPacemaker.Admin.Admin.InitTaminoAdapter() in c:\inetpub\wwwroot\learningpacemaker\admin\admin.aspx.cs:line 124


    Code

    private void InitTaminoAdapter()
    {
    string squery,prolog;

    		// create a TaminoDataAdapter object for the specified Tamino url and collection.
    adapter = new TaminoDataAdapter(connstring, collection);
    try
    {
    //make updates possible
    adapter.Behavior = TaminoAdapterBehavior.UpdateByItemMapping;
    
    //create a new dataset to hold the XML data retreived
    dataSet1 = new DataSet();
    //create the Tamino query and fill the dataset
    prolog = null;
    squery = "input()/*";
    
    TaminoQuery query = TaminoXQueryBuilder.BuildXQuery(prolog,squery,TaminoAdapterBehavior.UpdateByItemMapping);
    dataSet1 = new DataSet();
    adapter.Fill(dataSet1,query);
    //Bind the datasaet to the Datagrid
    DataGrid1.DataSource = dataSet1;
    DataGrid1.DataBind();
    //add the adapter to the Session
    Session["adapter"]=adapter;
    Session["dataset"]=dataSet1;
    
    }
    catch(System.Exception ex)
    {
    LPLog.writeLog(LPLog.CAUGHT_EX,
    ((string)Session["Username"]),
    Request.UserHostAddress,
    Request.Browser.Platform,
    Request.Browser.Type,
    ex.Message,
    ex.StackTrace.Replace("\r\n"," "),
    "");
    }
    

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


  • 2.  RE: Problem filling dataset with TaminoDataAdapter

    Posted Tue August 16, 2005 06:42 PM

    Are the schemas the same for the Tamino databases you are accessing? .Net datasets are sensitive to certain XML constructs and will generate totally different schemas for minor differences. For example, if you have a mixture of element text and attribute text, the “flattened” schema will have different tables and columns than with just element values or just attribute values.

    For example, 123value will result in one table caled “data” with two columns, whereas value will result in two tables, related by the “id” value.


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


  • 3.  RE: Problem filling dataset with TaminoDataAdapter

    Posted Wed August 17, 2005 08:55 AM

    Thanks for your reply, Douglas

    I am not assigning a shema to the dataset, if that is what you mean? Could this be the problem?

    The funny thing is, that I have the same asp.net code running on two different IIS servers, accessing the same Tamino database (on a third server), whereas both servers access succesfully with a TaminoConnection (to do the login), only one server can retreive the data with a dataset. Again, same code, same database, same (unchanged) XML content in the database.


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


  • 4.  RE: Problem filling dataset with TaminoDataAdapter

    Posted Wed August 17, 2005 10:54 PM

    I was asking about the Tamino schema, but if you are using the same database from the two IIS instances, then that’s obviously not the issue.

    You’ve probably checked already: you verified that the Tamino API, IIS and .Net components are the same versions between the two IIS?

    When I did something similar, I did use a .Net dataset schema and that worked, but then so does yours from one IIS.

    You should probably open a support log to help resolve this.


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


  • 5.  RE: Problem filling dataset with TaminoDataAdapter

    Posted Thu August 18, 2005 12:29 PM

    Thanks Douglas,

    In fact the two IIS servers are the same: both running Windows Server 2003, .Net 1.1 and the TaminoAPI.dll is in my Application bin directory, so the same as well.
    The only difference are the security settings; the server not working with the TaminoDataAdpater has tighter restrictions. Is this the source?

    I tried to fill the dataset with the TaminoDataAdpater in ReadOnly mode and it worked! the database entries where successfully displayed. But I want to use the dataset to change the values so I need UpdateByItemMapping mode which does not work.

    According to the Exception, the TaminoAdapter method detects a schema associated with the dataset, which doesn’t mach the schema of the returned query data. I do not assign a schema to the dataset and the dataset is empty (created with new DataSet). This seems strange. Should I assign a schema? if yes how and when?

    I guess I will try that, thanks


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


  • 6.  RE: Problem filling dataset with TaminoDataAdapter

    Posted Thu August 18, 2005 04:28 PM

    When you raise the support request please provide a copy of a log file using the config file as mentioned in this problem:

    http://tamino.forums.softwareag.com/viewtopic.php?t=5012


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


  • 7.  RE: Problem filling dataset with TaminoDataAdapter

    Posted Fri September 02, 2005 03:41 PM

    Hi Mark,

    Sorry for the long delay.

    I have the log file, how to raise a support request?

    Cheers,

    Yves


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


  • 8.  RE: Problem filling dataset with TaminoDataAdapter

    Posted Tue September 20, 2005 10:35 AM

    Please contact your local Software AG support.


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


  • 9.  RE: Problem filling dataset with TaminoDataAdapter

    Posted Fri December 23, 2005 04:06 PM

    I finally found the solution to the TaminoDataAdapter problem.

    1.) The one server giving the exception was running iis 6.0 the other one iis 5.1, so the explained error got something to do with iis 6.0

    2.) From the TaminoAPI trace log I found, that the network connection between the Tamino server and the iis 6.0 worked correctly.

    3.) The error stated, that the schema of the response and the dataset did not match, but there was no schema assigned. So I did assign a schema.

    4.) Once the schema was assigned, there was an error about an unrecognized ‘token’ element (an element to define a valid email address). So I removed this ‘token’ from the schema description and everything worked fine.

    Conclusion: when working with TaminoDataAdapter assign a schema to the dataset, at least when you work on iis 6.0 8=)


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