Hi Eric,I've pretty much stuck with calling row.store() or using an update cursor. I've followed these examples with the exception of the UpdateSearchedRows option, never had good results with it.
// Create a ComReleaser for cursor management.
using(ComReleaser comReleaser = new ComReleaser())
{
// Use ITable.Update to create an update cursor.
ICursor updateCursor = table.Update(null, true);
comReleaser.ManageLifetime(updateCursor);
// Find the positions of the fields used to get and set values.
int firstNameIndex = table.FindField("FirstName");
int lastNameIndex = table.FindField("LastName");
int emailIndex = table.FindField("Email");
IRow row = null;
while ((row = updateCursor.NextRow()) != null)
{
// Get the first and last names.
String firstName = Convert.ToString(row.get_Value(firstNameIndex));
String lastName = Convert.ToString(row.get_Value(lastNameIndex));
// Append the first letter of the first name and the entire last name with
// an "at" symbol and the email domain to make an email address.
String emailAddress = String.Concat(firstName[0], lastName, "@MyCompanyName.com");
row.set_Value(emailIndex, emailAddress);
updateCursor.UpdateRow(row);
}
}
G