Sql Views and Nav

Get our Free Newletter

Don't you have the time to be online here at DUG every day? So how do you follow what is going on in the Dynamics industry and community?
If you subscribe to the DUG Newsletter then you can relax! We will make sure that you don't miss the big news!

Check out our
Newsletter Subscription Center
page a complete list of our different newsletters.

This post has 2 Replies | 2 Followers

1 Posts
10 Points
Joined: 2008-11-4
Last Online:
2008-11-5 22:14
Location: Hodge
Justin Hodge Posted: 2008-11-4 0:47

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?

Male
822 Posts
6,395 Points
Joined: 2001-7-3
Last Online:
2011-10-24 11:52
Location: Vedbæk, Denmark
MicrosoftEmployee
Dean McCrae replied on 2008-11-5 20:52

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?

This posting is provided "AS IS" with no warranties, and confers no rights.
Male
6,520 Posts
63,613 Points
Joined: 2001-4-12
Last Online:
2012-5-17 8:32
Location: Prague, Czech Republic
DynamicsNAVMVP
Moderator
SystemAdministrator
David Singleton replied on 2008-11-5 22:03

Dean McCrae:

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. 

 

David Singleton - MVP Dynamics NAV Dynamics NAV Consultant since 1991 Available for Navision system performance design and tuning.
Dynamics Book

Page 1 of 1 (3 items) | Get this RSS feed | Bookmark and Share