Click here to Skip to main content
15,905,967 members
Home / Discussions / Database
   

Database

 
QuestionCorrect this sql Pin
Abdul-Rhman Alsri6-May-10 3:52
Abdul-Rhman Alsri6-May-10 3:52 
AnswerRe: Correct this sql Pin
loyal ginger6-May-10 3:56
loyal ginger6-May-10 3:56 
GeneralRe: Correct this sql Pin
Abdul-Rhman Alsri6-May-10 4:01
Abdul-Rhman Alsri6-May-10 4:01 
GeneralRe: Correct this sql Pin
loyal ginger6-May-10 5:29
loyal ginger6-May-10 5:29 
GeneralRe: Correct this sql Pin
Abdul-Rhman Alsri6-May-10 6:11
Abdul-Rhman Alsri6-May-10 6:11 
GeneralRe: Correct this sql Pin
Abdul-Rhman Alsri6-May-10 6:14
Abdul-Rhman Alsri6-May-10 6:14 
GeneralRe: Correct this sql Pin
Simon_Whale6-May-10 6:20
Simon_Whale6-May-10 6:20 
QuestionI'm stuck on - Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
gmhanna5-May-10 7:56
gmhanna5-May-10 7:56 
Hi,

I'm writing an application and I keep receiving an "Invalid Operation Exception" with this message: "Update requires a valid UpdateCommand when passed DataRow collection with modified rows."

I created a DataSource using the "Add New Data Source" option from Visual Studio 2010 and dragged the controls onto the form. The dataset is set to detail instead of datagrid.

Showing at the bottom of the form I have a ktReunionDataset, reunionBindingSource, reunionTableAdapter, tableAdapterManager.

This table was originally created from a MS-Access database and then was cloned using Visual Studio. I assigned a primary key to the "ID" field through the Server Explorer via the Open Table Definition, then right clicking on the ID field and assigning it the Primary Key. The ID field shows a key icon indicating it's the Primary Key.

The code for the Save button off the navigator looks like this:
 private void reunionBindingNavigatorSaveItem_Click(object sender, EventArgs e)
 {
     this.Validate();
     this.reunionBindingSource.EndEdit();
     this.tableAdapterManager.UpdateAll(this.kTReunionDataSet);

}

Do I need to manually code an update for when the user presses the save button, and iterating through each entry? I have looked at other examples and it doesn't have an update attached to the Data Adapter only Fill and FillByxxx so I'm not sure I need to add something here? Any help is appreciated.

Thank you,
Glenn

AnswerRe: I'm stuck on - Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
Simon_Whale5-May-10 10:07
Simon_Whale5-May-10 10:07 
AnswerRe: I'm stuck on - Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
Johan Hakkesteegt6-May-10 0:08
Johan Hakkesteegt6-May-10 0:08 
AnswerRe: I'm stuck on - Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
gmhanna6-May-10 4:37
gmhanna6-May-10 4:37 
QuestionHow to delete related Data/Rows. Pin
Abdul-Rhman Alsri5-May-10 3:34
Abdul-Rhman Alsri5-May-10 3:34 
AnswerRe: How to delete related Data/Rows. Pin
Simon_Whale5-May-10 5:08
Simon_Whale5-May-10 5:08 
GeneralRe: How to delete related Data/Rows. Pin
fjdiewornncalwe6-May-10 8:21
professionalfjdiewornncalwe6-May-10 8:21 
QuestionComparing rows to columns Pin
rajanandal4-May-10 23:09
rajanandal4-May-10 23:09 
AnswerRe: Comparing rows to columns Pin
Johan Hakkesteegt6-May-10 0:13
Johan Hakkesteegt6-May-10 0:13 
QuestionSqlServer: How to drop a column with a randomly named (default) constraint? Pin
Super Lloyd4-May-10 13:59
Super Lloyd4-May-10 13:59 
AnswerRe: SqlServer: How to drop a column with a randomly named (default) constraint? Pin
Super Lloyd4-May-10 15:01
Super Lloyd4-May-10 15:01 
QuestionRetrieving a DateTime value with OracleClient Pin
Bernhard Hiller4-May-10 5:24
Bernhard Hiller4-May-10 5:24 
AnswerRe: Retrieving a DateTime value with OracleClient Pin
Chris Meech5-May-10 2:56
Chris Meech5-May-10 2:56 
GeneralRe: Retrieving a DateTime value with OracleClient Pin
David Skelly5-May-10 4:49
David Skelly5-May-10 4:49 
GeneralRe: Retrieving a DateTime value with OracleClient Pin
Bernhard Hiller6-May-10 21:36
Bernhard Hiller6-May-10 21:36 
QuestionSQL Server 2008 Spatial Data Pin
Bassam Saoud4-May-10 4:34
Bassam Saoud4-May-10 4:34 
AnswerRe: SQL Server 2008 Spatial Data Pin
Peter_in_27805-May-10 18:36
professionalPeter_in_27805-May-10 18:36 
GeneralRe: SQL Server 2008 Spatial Data Pin
Bassam Saoud6-May-10 4:09
Bassam Saoud6-May-10 4:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.