Hello everybody,
i have a form in which i use a temporary table. The first time the user push a button in the form, some records are inserted into this temporary table. When he push the button again i puted a function to delete all the records previously inserted to insert the new one; They are deleted but still got a message telling me that the record already exist when the insert process begin. I think it's an update problem but how to solve it?How to update a temporary table? :-k
0
Answers
TempRec.DELETEALL;
SELECTLATESTVERSION;
TempRec.RESET;
TempRec.INIT;
If that don't work then
IF NOT TempRec.INSERT THEN
TempRec.MODIFY;
Running a form on a temporary table, you might also try using two temporary tables, so you are not deleting the displayed records, only replacing them.
Run your Code on TempRec2 then
TempRec := TempRec2;
CURRFORM.UPDATE(FALSE);
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
TempRec := TempRec2;
CURRFORM.UPDATE(FALSE);
but that doesn't work!!!! :? What should i do?
TempRec.reset;
TempRec.DELETEALL;
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n