Excluding table from transaction handling?

I think the answer to this is that it is not possible but in case anyone has any clever ideas. I have a codeunit that using varying degress of black magic updates an external application as well as numerous tables in Navision. If an error occurs in within the codeunit all changes in the transaction are rolled back, but the change in the external program, of course, is not. What I would like to do it log the data sent to the external application in a Navision table. This is simple enough but the records written to this table will be rolled back as well. What I would really like to do is commit the records to this new table whilst letting the standard transaction handling roll back any other changes made. Any ideas?

Would it be possible/feasible to write the “log data” into a (ASCII)file?

Can you run through the entire process twice? The first time, only update the new table and the second time doing the rest of the processing, with a COMMIT in the middle. Just a thought.

Thanks for your suggestions guys. I ended up taking an entirely different approach and creating a table to hold the information needed to update the external program. At the end of the codeunit, if everything was sucessful I went through this new table and update the external app flagging the records as processed and leaving them there as the log. Meant rewriting the codeunit but a much better solution.

You dont say if you’re running SQL but on the SQL version you can do exactly as you wanted by setting the LinkedObject and LinkedInTransaction properties. Setting the latter to No will cause a separate transaction to be used on the particular table, outside of the current Navision transaction.

Robert, In this particular case it is a native database so this doesn’t help. I didn’t know that property even existed so that’s a really useful one to know for the future. Many thanks