G
Goldenrate
Hi,
I have the following method in an object name SpouseBLL:
[System.ComponentModel.DataObjectMethodAttribute
(System.ComponentModel.DataObjectMethodType.Update,true)]
public bool UpdateSpouse(Spouse obj) {
//Create a new product row instance
MRF.MRF_SpouseDataTable spouses =
Adapter.GetSpouseByGuestId(obj.GuestId);
MRF.MRF_SpouseRow spouse = spouses[0];
spouse.FirstName = obj.FirstName;
spouse.LastName = obj.LastName;
spouse.GuestId = obj.GuestId;
spouse.MobilePhone = obj.MobilePhone;
spouse.Email = obj.Email;
spouse.LectureLanguage = obj.LectureLanguage;
spouse.DateOfBirth = obj.Dob;
//Add the new spouse
int rowsAffected = Adapter.Update(spouse);
return rowsAffected == 1;
}
When I try to update the database I receive the following error:
I have written the exact method for another object and it works with no
problem.
Thanks,
David
I have the following method in an object name SpouseBLL:
[System.ComponentModel.DataObjectMethodAttribute
(System.ComponentModel.DataObjectMethodType.Update,true)]
public bool UpdateSpouse(Spouse obj) {
//Create a new product row instance
MRF.MRF_SpouseDataTable spouses =
Adapter.GetSpouseByGuestId(obj.GuestId);
MRF.MRF_SpouseRow spouse = spouses[0];
spouse.FirstName = obj.FirstName;
spouse.LastName = obj.LastName;
spouse.GuestId = obj.GuestId;
spouse.MobilePhone = obj.MobilePhone;
spouse.Email = obj.Email;
spouse.LectureLanguage = obj.LectureLanguage;
spouse.DateOfBirth = obj.Dob;
//Add the new spouse
int rowsAffected = Adapter.Update(spouse);
return rowsAffected == 1;
}
When I try to update the database I receive the following error:
I have written the exact method for another object and it works with no
problem.
Thanks,
David