Marko Bonaci commented on Jul 21, 2012

Re: Employ document locking to assure number uniqueness in sequential document numbering solution

Hi Jim, you're right, it should be used to test whether lock was successful.

You should handle that event your own way, depending on your application (wait a second and retry, prompt a user to retry, skip and fill later by an agent, ...).

Jim Fricker commented on Mar 19, 2012

Why is there no check to ensure the document lock was successful?

doc.Lock returns a flag to let you know if you have managed to successfully lock the document. This return value is not used in this code. Is there a valid reason why?