Most of the time when we want to do an update, delete or insert to the database we use begin, rollback SQL statements.
If only you are very sure that you will be using commit tran.
Why we use rollback tran is to make sure that what ever that we do has not caused the data in the DB to be in inconsistent state. Lets take a look at the below example.
1. begin tran
2. update HumanResources.Employee
3. set NationalIDNumber = 60
4. where EmployeeID = 257
5. rollback tran
If your transaction is not completed then you will not be able to check the changes in the data in the DB as the changes have not been committed yet.
During such times you can run the below statement and get this job done.
set transaction isolation level read uncommitted
This blog describes mostly about the work (CRM 365, CRM 2016, CRM 2015, CRM2011, CRM 4.0, CRM 3.0, C#,Javascript and SQL Server) i do.
Subscribe to:
Post Comments (Atom)
Retrieving Calendar of a Bookable Resource in Dynamics
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...
-
There is a bit of change in CRM 2011 than CRM 4. The code is below. Microsoft.Xrm.Sdk. EntityReference Moniker1 = new Microsoft.Xrm.S...
-
When you create a new security role from scratch and then assign only that role to a system user and when you log to the CRM site you might ...
-
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...
No comments:
Post a Comment