I'm trying to either modify or insert new records in a database with the
code listed below. I tried adding the RowUpdating and RowUpdated events and
put breakpoints there, but it never gets there. I'm not sure why. I've
checked the dataset and it gets modified after the LoadDataRow command
executes. Any help would be appreciated.
Thanks,
John
--------------- code snippet from the btnSave_Click event -------------
object[] objRow = new object[7];
if (mode != "NewRecord")
{objRow[0] = lblOrganizationID.Text;}
objRow[1] = txtOrganization.Text;
objRow[2] = txtAbbreviation.Text;
objRow[3] = cboParent.SelectedValue;
objRow[4] = cboHierarchy.SelectedValue;
objRow[5] = cboSector.SelectedValue;
objRow[6] = cboIndustry.SelectedValue;
DataRow rowUpdate;
dsOrganizations1.Tables["Organizations"].BeginLoadData();
rowUpdate =
dsOrganizations1.Tables["Organizations"].LoadDataRow(objRow,true);
dsOrganizations1.Tables["Organizations"].EndLoadData();
this.daOrganizations.Update(dsOrganizations1,"Organizations");