Hi guys.
I am a newbie both in C# and Tamino .NET API, just received a task in the university, so please be so kind to help me. Next time you come to Moscow I promise to provide you some beer
I’ve got a problem.
I fill a dataset from Tamino and show all data in dataGrid.
Then I edit some values in dataGrid and try to update Tamino.
After that I have an error message, saying “No update information found for query result”.
Be sure, I really change some data in dataGrid, so it’s impossible that there’s no update info.
I use two buttons - one for populating data and filling the dataSet, second for updating Tamino.
Here’s the code.
private void button1_Click(object sender, System.EventArgs e)
{
TaminoDataAdapter adapter =
new TaminoDataAdapter("http://"+tamino_host.Text+"/tamino/"+tamino_db.Text, tamino_collection.Text);
adapter.Behavior = TaminoAdapterBehavior.UpdateByItemMapping;
adapter.FillSchema(dataSet1, "User");
TaminoQuery query = TaminoXQueryBuilder.BuildXQuery(null, "input()/User",
TaminoAdapterBehavior.UpdateByItemMapping);
adapter.Fill(dataSet1, query);
dataGrid1.DataSource = dataSet1;
}
private void button2_Click(object sender, System.EventArgs e)
{
TaminoDataAdapter adapter =
new TaminoDataAdapter("http://"+tamino_host.Text+"/tamino/"+tamino_db.Text, tamino_collection.Text);
adapter.Behavior = TaminoAdapterBehavior.UpdateByItemMapping;
adapter.Update(dataSet1);
dataSet1.AcceptChanges();
}
Stack:
- adapter {SoftwareAG.Tamino.Api.DataAdapter.TaminoDataAdapter} SoftwareAG.Tamino.Api.DataAdapter.TaminoDataAdapter
System.Object {SoftwareAG.Tamino.Api.DataAdapter.TaminoDataAdapter} System.Object
Behavior UpdateByItemMapping SoftwareAG.Tamino.Api.DataAdapter.TaminoAdapterBehavior
Collection "ConferSys" string
- Command {SoftwareAG.Tamino.Api.TaminoCommand} SoftwareAG.Tamino.Api.TaminoCommand
System.Object {SoftwareAG.Tamino.Api.TaminoCommand} System.Object
Collection "ConferSys" string
+ Connection {SoftwareAG.Tamino.Api.TaminoConnection} SoftwareAG.Tamino.Api.TaminoConnection
IsolationLevel Default SoftwareAG.Tamino.Api.TaminoIsolationLevel
LockMode Default SoftwareAG.Tamino.Api.TaminoLockMode
Lockwait Default SoftwareAG.Tamino.Api.TaminoLockwait
m_collection "ConferSys" string
+ m_connection {SoftwareAG.Tamino.Api.TaminoConnection} SoftwareAG.Tamino.Api.TaminoConnection
+ m_lockValues {SoftwareAG.Tamino.Api.Common.LockValue} SoftwareAG.Tamino.Api.Common.LockValue
+ s_trace {SoftwareAG.Tamino.Api.Common.ApiTraceSwitch} SoftwareAG.Tamino.Api.Common.ApiTraceSwitch
Url "http://localhost/tamino/ConferSys/ConferSys" string
+ Connection {SoftwareAG.Tamino.Api.TaminoConnection} SoftwareAG.Tamino.Api.TaminoConnection
ContinueUpdateOnError false bool
m_behavior UpdateByItemMapping SoftwareAG.Tamino.Api.DataAdapter.TaminoAdapterBehavior
m_collection "ConferSys" string
+ m_command {SoftwareAG.Tamino.Api.TaminoCommand} SoftwareAG.Tamino.Api.TaminoCommand
+ m_connection {SoftwareAG.Tamino.Api.TaminoConnection} SoftwareAG.Tamino.Api.TaminoConnection
m_continueUpdateOnError false bool
+ m_dsHandlerList {Count=0x0} System.Collections.ArrayList
m_query <undefined value> SoftwareAG.Tamino.Api.TaminoQuery
m_singleItemUpdates true bool
Query <undefined value> SoftwareAG.Tamino.Api.TaminoQuery
+ s_trace {SoftwareAG.Tamino.Api.Common.ApiTraceSwitch} SoftwareAG.Tamino.Api.Common.ApiTraceSwitch
SingleItemUpdates true bool
TaminoUpdated <undefined value> SoftwareAG.Tamino.Api.DataAdapter.TaminoUpdatedEventHandler
TaminoUpdating <undefined value> SoftwareAG.Tamino.Api.DataAdapter.TaminoUpdatingEventHandler
adapter.Behavior UpdateByItemMapping SoftwareAG.Tamino.Api.DataAdapter.TaminoAdapterBehavior
- dataSet1 {System.Data.DataSet} System.Data.DataSet
- System.ComponentModel.MarshalByValueComponent {System.Data.DataSet} System.ComponentModel.MarshalByValueComponent
System.Object {System.Data.DataSet} System.Object
Container <undefined value> System.ComponentModel.IContainer
DesignMode false bool
EventDisposed {System.Object} System.Object
- Events {System.ComponentModel.EventHandlerList} System.ComponentModel.EventHandlerList
System.Object {System.ComponentModel.EventHandlerList} System.Object
head <undefined value> System.ComponentModel.EventHandlerList.ListEntry
Item <cannot view indexed property> System.Delegate
- events {System.ComponentModel.EventHandlerList} System.ComponentModel.EventHandlerList
System.Object {System.ComponentModel.EventHandlerList} System.Object
head <undefined value> System.ComponentModel.EventHandlerList.ListEntry
Item <cannot view indexed property> System.Delegate
Site <undefined value> System.ComponentModel.ISite
site <undefined value> System.ComponentModel.ISite
_datasetPrefix "" string
caseSensitive false bool
CaseSensitive false bool
+ culture {System.Globalization.CultureInfo} System.Globalization.CultureInfo
DataSetName "NewDataSet" string
dataSetName "NewDataSet" string
+ DefaultViewManager {System.Data.DataViewManager} System.Data.DataViewManager
+ defaultViewManager {System.Data.DataViewManager} System.Data.DataViewManager
EnforceConstraints true bool
enforceConstraints true bool
+ ExtendedProperties {System.Data.PropertyCollection} System.Data.PropertyCollection
+ extendedProperties {System.Data.PropertyCollection} System.Data.PropertyCollection
fBoundToDocument true bool
FBoundToDocument true bool
fEnableCascading true bool
fInitInProgress false bool
fInLoadDiffgram false bool
fInReadXml false bool
fIsSchemaLoading false bool
fTopLevelTable false bool
HasErrors false bool
KEY_XMLDIFFGRAM "XmlDiffGram" string
KEY_XMLSCHEMA "XmlSchema" string
+ Locale {System.Globalization.CultureInfo} System.Globalization.CultureInfo
Namespace "" string
namespaceURI "" string
+ onClearFunctionCalled {System.Data.DataSetClearEventhandler} System.Data.DataSetClearEventhandler
+ onDataRowCreated {System.Data.DataRowCreatedEventHandler} System.Data.DataRowCreatedEventHandler
onMergeFailed <undefined value> System.Data.MergeFailedEventHandler
+ onPropertyChangingDelegate {System.ComponentModel.PropertyChangedEventHandler} System.ComponentModel.PropertyChangedEventHandler
Prefix "" string
+ relationCollection {System.Data.DataRelationCollection.DataSetRelationCollection} System.Data.DataRelationCollection
+ Relations {System.Data.DataRelationCollection.DataSetRelationCollection} System.Data.DataRelationCollection
+ rowDiffId {Count=0x0} System.Collections.Hashtable
+ RowDiffId {Count=0x0} System.Collections.Hashtable
Site <undefined value> System.ComponentModel.ISite
+ tableCollection {System.Data.DataTableCollection} System.Data.DataTableCollection
+ Tables {System.Data.DataTableCollection} System.Data.DataTableCollection
zeroTables {Length=0x0} System.Data.DataTable[]
- this {WindowsApplication1.Form1} WindowsApplication1.Form1
+ System.Windows.Forms.Form {WindowsApplication1.Form1} System.Windows.Forms.Form
+ _Form1AutoHideControl {Infragistics.Win.UltraWinDock.AutoHideControl} Infragistics.Win.UltraWinDock.AutoHideControl
+ _Form1UnpinnedTabAreaBottom {Infragistics.Win.UltraWinDock.UnpinnedTabArea} Infragistics.Win.UltraWinDock.UnpinnedTabArea
+ _Form1UnpinnedTabAreaLeft {Infragistics.Win.UltraWinDock.UnpinnedTabArea} Infragistics.Win.UltraWinDock.UnpinnedTabArea
+ _Form1UnpinnedTabAreaRight {Infragistics.Win.UltraWinDock.UnpinnedTabArea} Infragistics.Win.UltraWinDock.UnpinnedTabArea
+ _Form1UnpinnedTabAreaTop {Infragistics.Win.UltraWinDock.UnpinnedTabArea} Infragistics.Win.UltraWinDock.UnpinnedTabArea
+ button1 {Text="populate data"} System.Windows.Forms.Button
+ button2 {Text="update data"} System.Windows.Forms.Button
+ components {System.ComponentModel.Container} System.ComponentModel.IContainer
+ dataGrid1 {System.Windows.Forms.DataGrid} System.Windows.Forms.DataGrid
+ dataSet1 {System.Data.DataSet} System.Data.DataSet
+ dockableWindow1 {Infragistics.Win.UltraWinDock.DockableWindow} Infragistics.Win.UltraWinDock.DockableWindow
+ label1 {System.Windows.Forms.Label} System.Windows.Forms.Label
+ label2 {System.Windows.Forms.Label} System.Windows.Forms.Label
+ label3 {System.Windows.Forms.Label} System.Windows.Forms.Label
+ label4 {System.Windows.Forms.Label} System.Windows.Forms.Label
+ panel1 {System.Windows.Forms.Panel} System.Windows.Forms.Panel
+ tamino_collection {Text="ConferSys"} System.Windows.Forms.TextBox
+ tamino_db {Text="ConferSys"} System.Windows.Forms.TextBox
+ tamino_host {Text="localhost"} System.Windows.Forms.TextBox
+ tamino_tables {SelectedItem=""} System.Windows.Forms.ListBox
+ ultraDockManager1 {Infragistics.Win.UltraWinDock.UltraDockManager} Infragistics.Win.UltraWinDock.UltraDockManager
+ windowDockingArea1 {Infragistics.Win.UltraWinDock.WindowDockingArea} Infragistics.Win.UltraWinDock.WindowDockingArea