[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Auto Number


On Monday 01 April 2002 08:20, you wrote:
> 	Is it possible to have auto number generation in LDAP. Like we have
> in RDBMS, usually the primary key number is set to auto number and it keeps
> incrementing as new records are added to the table. I dont think this will
> be possible with LDAP ?? Any idea how can I achieve this ??

One thing you could try is:
1) Have one container for those numbers reserverd: o=IDs
2) Loop
2a) Randomly select a new number NUM
2b) Try to create an object cn=NUM,o=IDs
      On success: NUM is the new id; end
      On Failure: continue

This is not exaclty numbering (and tus is not restricted to numbers),
but it should provide you with unique identifiers and should work on
any LDAP server.


Peter Marschall     |   eMail: peter.marschall@mayn.de
Scheffelstraße 15   |          peter.marschall@is-energy.de
97072 Würzburg      |   Tel:   0931/14721
PGP:  D7 FF 20 FE E6 6B 31 74  D1 10 88 E0 3C FE 28 35