[progress Communities] [progress Openedge Abl] Forum Post: Re: Incrementing A Part Number

Status
Not open for further replies.
J

jmls

Guest
find last Part use-index PartNumber . NewPartNumber = (if available Part then Part.PartNumber + 1 else 1). Sorry, but this is a terrible, terrible idea. What happens when more than one user runs this code at the same time ? They get the same part number. You should generate things like this from sequences. If you are concerned about "gaps" (records not committed) then you should record / audit the reason why there is a gap. Or wait until the record is being created and then get the next sequence.

Continue reading...
 
Status
Not open for further replies.
Top