Hi,
I heared from someone that sql modify could work faster when you do this:
rec.RESET;
rec.SETFILTER(...);
rec.find('-');
rec.field := value;
rec.MODIFY();
instead of :
rec.RESET;
rec.SETFILTER(...);
rec.find('-');
rec2.COPY(rec);
rec2.field := value;
rec2.MODIFY();
is this true?
If it is, can someone give me some example to test this?
There are no bugs, only random undocumented features...
---
My Blog:
http://NAV-Magno.be
Comments
Even if it did, it's just one record you are modifying, that's not where you want to focus your attention when fighting performance issues.
RIS Plus, LLC
What's wrong with first example? :?
Why even bother to use second one ? :roll:
Unless there is some catch?
regards
Bostjan
---
My Blog: http://NAV-Magno.be
Yes it would be, but even more different if field is in the key that is used.
The second one is ](*,)
Bostjan
would the first be faster or the second one?
---
My Blog: http://NAV-Magno.be
It's not speed. In first version if you change value that is in the key and you are in the loop you can get "suprise" when NEXT-ing to the next record. ](*,)
Bostjan
So there would be no difference only for SQL?
---
My Blog: http://NAV-Magno.be
But like bostjanl said, it is needed to to avoid surprises in a loop (both Navision as SQL-DB). (Surprises : not all records are processed OR endless loop)
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!