Sql Views and Nav

Hello everyone.

I really appreciate if you could help me with this question.
I have 2 databases in the same SQL Server. I’ve created a view to share information between 2 tables (one in each DB). The tables have exactly the same fields (it’s the same fob except the LinkedObject(Yes) and the LinkedInTransaction(No)).
I have a codeunit that inserts data in that tables. But if I get an error in my codeunit, the record stays in the table.
Isn’t there a rollback process in this situation?

When you have LinkedInTransaction set to No, NAV uses a separate connection and separate transaction for accessing that table, from the main NAV connection. So when the main connection rollsback due to the error, it does not affect the transaction performed for the linked object. This is the purpose of LinkedInTransaction - to be isolated from the main transaction - but you loose normal transaction semantics.

Since the databases are on the same server, have you tried setting LinkedInTransaction to Yes?

WOW that’s the simplest and clearest explanation of LinkedinTransaction that I have seen.

Thanks.

PS maybe the text above could be used to replace the text in the online help.