Hi Ben Lau,
Thanks for your quickly response! I have tried to use 2 methods you had given to update and remove records in Database. But it doesn't help me solve the problem. Details:
+ remove() function doesn't remove any records. I also check the result carefully.
+ save() function helps me create/update record well. It is a good function. But when I only wanna update a field in table then I have to update all other fields in table unless the data in field will be empty. I don't understand what the reason is.
This is the code that I used to update records
Family family;
if (family.load(DQWhere("FamilyID") == 1)) {
family.FamilyID = family_id_value;
family.Name = family.Name->toString();
family.Address = family.Address->toString();
family.Address2 = family.Address2->toString();
family.City = family.City->toString();
family.Country = family.Country->toString();
family.Email = email;
family.save();
}
As you see, I have to update all fields in table when I only want to update field Email.
Do you have any ideas?
Thanks!
Vào 21:26:58 UTC+7 Thứ tư, ngày 24 tháng bảy năm 2013, Ben Lau đã viết: