Semaphore.mdb |
Post Reply |
Author | |
Neil Squires
Contributor Joined: 30 Jun 2008 Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 10 Jul 2008 at 3:01am |
I developed this solution because on several lists I'm on, there are questions each week about clients wanting autonumbers displayed and they get upset when there are gaps. They are expecting sequential numbers, and the autonumber datatype doesn't quite match what they are looking for. This program will allow the developer to get the next number increment. They may request either (Max+1), or fill in missing numbers first, then get (Max+1). The code should work in a muti-user environment. It uses semaphore logic to prevent 2 users from retrieving the same number at the same time. Note: This new functionality is not meant to superscede the autonumber datatype. You should still use autonumber for relational integrity, but if the user wants a number to see, this is a solution worth looking at. Access Version: 2000 and probably newer. References: Microsoft ActiveX Data Objects 2.1 Library Microsoft ADO Ext. 2.7 for DDL and Security
|
|
--
Email: GreaterDesignConcepts@yahoo.com I only ask that the comments be left intact in the code module. Otherwise, it's for use freely by whoever. |
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |