I\'m sure there is an extremely simple reason that this one line isn\'t working, but it has evaded for the past week, so I\'m hoping someone else will notice my fault.
Try the below source.
private void btnSave_Click(object sender, EventArgs e)
{
cb = new SqlCommandBuilder(dataAdapt);
//Old source: DataRow daRow = dataRecipe.Tables["CookBookRecipes"].Rows[inc];
//Added source code
DataRow daRow = dataRecipe.Tables["CookBookRecipes"].NewRow();
//Added source code
dataRecipe.Tables["CookBookRecipes"].AddRow(daRow);
daRow.BeginEdit();
daRow[0] = tbRName.Text;
daRow[1] = listBox1.SelectedItem.ToString();
daRow[2] = tbRCreate.Text;
daRow[3] = tbRIngredient.Text;
daRow[4] = tbRPrep.Text;
daRow[5] = tbRCook.Text;
daRow[6] = tbRDirections.Text;
daRow[7] = tbRYield.Text;
daRow[8] = textBox1.Text;
daRow.EndEdit();
//Reset state of rows to unchanged
dataRecipe.Tables["CookBookRecipes"].AcceptChanges();
//Set modified. The dataAdapt will call update stored procedured
//for the row that has Modifed row state.
//You can also try SetAdded() method for new row you want to insert
daRow.SetModified();
if (MessageBox.Show("You wish to save your updates?", "Save Updates?", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
dataAdapt.Update(dataRecipe, "CookBookRecipes");
MessageBox.Show("Recipe Updated", "Update");
}
}