multiple rows were updated
-
i get this error if a user deletes a record and that record has a duplicate data in the file. all records are unique though. i do have a time stamp and a userid field that will always create unique records. so the complete record is not duplicated. the table that i am using is a VFP table with no index attached. in my application i have no order set. is there a way to trap this error, ignore and continue. thank you.
-
i get this error if a user deletes a record and that record has a duplicate data in the file. all records are unique though. i do have a time stamp and a userid field that will always create unique records. so the complete record is not duplicated. the table that i am using is a VFP table with no index attached. in my application i have no order set. is there a way to trap this error, ignore and continue. thank you.
Catch a CDBExeption object. If you don't know what I mean, lookup try in MSDN. Good luck, Bill
-
Catch a CDBExeption object. If you don't know what I mean, lookup try in MSDN. Good luck, Bill
i have created a try/catch/throw handler. it allows me to trap the error with my own message and exit my loop. but what i need is a way to prevent the error from happening at all. is this possible? actually i did not mention that i am using a crecordset that is setup as snapshot. this is the only way i could get a VFP database to work.
-
i have created a try/catch/throw handler. it allows me to trap the error with my own message and exit my loop. but what i need is a way to prevent the error from happening at all. is this possible? actually i did not mention that i am using a crecordset that is setup as snapshot. this is the only way i could get a VFP database to work.
What is the actual error condition. Your original post didn't mention it. Are you trying to trap an error or avoid it? The difference definitely effects the answer. Is the problem that the database is actually deleting multiple rows? If so, you can fix the problem(it is not really an error, just a coding mistake) by using more specific criteria in your SQL statements. Good luck, Bill
-
What is the actual error condition. Your original post didn't mention it. Are you trying to trap an error or avoid it? The difference definitely effects the answer. Is the problem that the database is actually deleting multiple rows? If so, you can fix the problem(it is not really an error, just a coding mistake) by using more specific criteria in your SQL statements. Good luck, Bill
i have a list box that allows the user to mark items to be deleted. on exit of the application i check the listbox and delete the records. i have double checked and none of my records are duplicated. but i do have some logs that have duplicate core data(all but 3 fields the same). the error occurs on the delete function. i have tried a try/catch around the delete function and it will trap the error and exit me out of my loop, but that is not what i need. again i do not have a sort set on the records, my list box takes care of and sorting. thank you do{ retval = pCtrl->GetItemState(ckrec,LVIS_STATEIMAGEMASK); if(retval == LVIS_SELECTED && !m_pSet->IsEOF()){ UpdateData(true); m_pSet->SetAbsolutePosition(ckrec+1); DeleteFile(Buffer); m_pSet->Delete(); } ckrec++; }while(ckrec <= pCtrl->GetItemCount());