One easy way is to use a database that supports an autoincrement
field.
Another one is to have a third proggy that communicates via messages
and acts as a number dispenser.
On 1 Jun 99 at 11:33, Jason Webb wrote:
> I hope someone has some ideas as I'm stuck.
>
> I have a situation where two delhi programs need to obtain an incrimenting
> unique ID number from the single source.
>
>
> So an example.
>
> Delphi progrm 1 processes and gets unique ID 1000
> Delphi program 2 processes and gets inque ID 1001
> Delphi progrm 1 processes and gets unique ID 1002
> Delphi program 2 processes and gets inque ID 1003
> Delphi progrm 2 processes and gets unique ID 1004
> Delphi program 2 processes and gets inque ID 1005
> and so on....
>
> So it's reasonably easy to use a single ini file or share a registry entry
> but what hapens when both programs want to get a unique ID at the same time.
>
> In future I'll have more delhi programs that need to get the uniqie ID form
> the same source.
>
>
> Thanks for any help.
>
> Jason Webb
>
>
>
> ---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
Rohit
======================================================================
CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand
PH (649) 489-2280
FX (649) 489-2290
email [EMAIL PROTECTED] or [EMAIL PROTECTED]
======================================================================
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz