According to the help on BUFFER-COPY...
Is there a way of stopping this with a parameter or something? Other than doing and IF AVAILABLE of course... Pretty sure this didn't use to be the case and we've got a bunch of legacy code that is badly written and is creating rogue records.
Thread created by James PalmerAccording to the help on BUFFER-COPY...
Is there a way of stopping this with a parameter or something? Other than doing and IF AVAILABLE of course... Pretty sure this didn't use to be the case and we've got a bunch of legacy code that is badly written and is creating rogue records.
Stop receiving emails on this subject.Flag this post as spam/abuse.
Thanks for the answer. Don't have a valid use case. Just found a raft of copies that are using the wrong buffer as the target. It creates a record in one table and then buffer copies to a different table. As we explicitly CREATE for buffer copy in normal circumstances the option to just make this code break while we fix all the instances would be nice!
Thanks Brian.
So you're looking for a SESSION WIDE switch to control buffer-copy's behavior?
That's the sort of thing I was thinking, yes. We've fixed our particular instance of the problem now, but it could have been nasty! :)
always found misleading the buffer-copy behaviour, it should be either always create the record or expect the record to exists and fail-fast if not... keeping that for backward compatibility only means that there are code that not always behave as expected, very hard to spot the issue and the thing will keep on 'working' till some business user discover there are actually inconsistency in application's data :(
best will be if the compiler could issue warnings for cases like that, then at least one knows have potential issues in code and can go and hunt them down... just because is a 4GL doesn't mean it has to be fault-tolerant ;)