Hi,
We have a trigger that calls program a.p. This program makes a persistent call to b.p, runs an internal procedure and then when its done it deletes the handle to b.p.
Under some circumstances when the handle to b.p is deleted ( DELETE PROCEDURE hHandle_b.p)
We get the error "Attempt to disconnect a <table> record, which is running a trigger. (2869)" and the program crashes. Any ideas as to the cause? At this time my only option is to not call b.p persistently.
Thanks.
The DELETE PROCEDURE statement disconnects any local buffers established by the procedure. In addition, any buffers passed as parameters to a persistent procedure are treated as local buffers. While all cursor positioning established on these buffers by the persistent procedure is lost, there is no affect on the original buffers passed as parameters from the caller. Note that all buffers are validated before being disconnected (which might cause database write triggers to execute). If the validation fails, the DELETE PROCEDURE statement raises the ERROR condition and pends the deletion until the validation succeeds and all database write triggers have completed.
Andriy.