I have an app that I started by using the IDE to drop boxes onto a form
and then bound them to the underlying database with dataadapters and
binding sources. When I step through the records the fields (textboxes)
change appropriately, but edits are not written to the database. The
following code was generated by the IDE:
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(orsDataSet2.ORS_ENTITIESDataTable dataTable) {
return this.Adapter.Update(dataTable);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(orsDataSet2 dataSet) {
return this.Adapter.Update(dataSet, "ORS_ENTITIES");
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(global::System.Data.DataRow dataRow) {
return this.Adapter.Update(new global::System.Data.DataRow[] {
dataRow});
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(global::System.Data.DataRow[] dataRows) {
return this.Adapter.Update(dataRows);
}
What do I need to add and where do I add it to have the data updated?
Loading
Vijaya KadiyalaPosted Jul 3, 2008, 1:42 PM
HI,
Instead of updating thru adapters why can;t you write plain SQL to update it? This way you wil have better control on what you are doing.
Thanks -- Vj
http://dotnetvj.blogspot.com