> 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.

1. Open a file for reading and writing with deny write sharing mode.
    If fail opening then wait a split second and retry.
2. Read ID+1 and write result to file and close file.

If it's for a database app you could use either

Paradox - autoinc field
SQL systems - a stored procedure
ORACLE - a sequence generator.

alternatively create a table with 1 field for each ID
open table exclusively and get next ID alter table to increment ID.
close table.

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to