This is weird - I see a few articles about this but never see any
answers.
I have a dataset that is being filled like so:
private void Page_Load(object sender, System.EventArgs e)
{
oSelComm.Parameters[0].Value = Session["userID"];
oAdpt.Fill(oDS1);
if (!(Page.IsPostBack))
{
Page.DataBind();
}
}
Then I change some values on the DataRow like so:
private void cmdUpdate_Click(object sender, System.EventArgs e) {
//update...
oUpComm.Parameters[17].Value = Session["userID"];
DataRow oRow = oDS1.Tables[0].Rows[0];
oRow["GGrandMothersNameD"]
txtGroomsGrandMother_Father.Text.ToString();
oRow["GGrandMothersNameM"]
txtGroomsGrandMother_Mother.Text.ToString();
oAdpt.Update(oDS1, "Profile");
Response.Redirect("1yourStory.aspx");
}
When I do this I get the "Concurrency violation: the UpdateCommand
affected 0 records"
Anyone understand what is going on here?