Quantcast
Viewing all articles
Browse latest Browse all 4841

Re: How to reset value of a custom property of an MDO object?

Hi Manisha

 

I would second Swaroop's suggestion to read the ID and then increment it in the insert. However please understand that such an approach has severe drawbacks and also potential for failure.

For example assume 2 people execute the transaction in parallel and they simultaneously read the ID and then try to increment. One of them will surely end up with Primary Key Non Unique problem.

 

The way to avoid this would be to do a SELECT FOR UPDATE.

 

The best way to do this is not to use incremented ID as Key. Instead use GUID.

 

Regards

Partha


Viewing all articles
Browse latest Browse all 4841

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>