Domino 9 und frühere Versionen > Entwicklung

Ist DOCID eindeutig?

(1/3) > >>

pippo:
Hallo zusammen,

einfache Frage:
Habe ca. über 150 Notesserver & Datenbank (Repliken) wo auf jedem Notesserver Dokumente erstellt werden. Ist nun die DocID eindeutig oder kann es vorkommen, dass Dokumente dieselbe DocID haben?

Grüße, Pippo

Glombi:
Was verstehst Du unter "DocID" ?
Wenn Du @Text(@DocumentUniqueID) bzw. doc.UniversalID meinst: Du ist über alle Repliken einer Datenbank eindeutig.

Andreas

pippo:
Hallo Andreas,

vielen Dank für die schnelle Antwort!

ich meine: doc.UniversalID

Glaube Dir gerne, aber ist das sicher? Hast Du Dokumentation dazu?

Verstehe mich bitte nicht falsch!

Ich frage nur, weil es sich um eine wichtige DB handelt.

Grüße, Pippo

Semeaphoros:
Solange Du sie nicht selber veränderst, ist sie eindeutig, die Eindeutigkeit wird mit einer Verschlüsselung von Datum und Zeit der Erstellung und vermutlich noch mehr erreicht. Das steht aber auch irgendwo in der Designer-Hilfe, wo Du nachschlagen kannst.

Glombi:
Das Ding ist eindeutig. Aus der KBase

   Lotus Software Knowledge Base
   Technote   
      

Title:   
      How to Generate a UNID (Universal ID) Using LotuScript
Product:
Platform(s):
   Lotus Notes  >  Lotus Notes  >  6.x, 5.x, 4.x
      Platform Independent
      
Document Number:   1112556   Date:   16.06.2003


      
      
Problem
The LotusScript UniversalID property (of the NotesDocument class) is Read-Write.  How can you create a unique UNID which would be similar in construction to the UNID that Notes Domino generates?



Solution
The UNID is made up of 32 hex digits as follows:

- The first 16 digits are random  
- The next 2 digits are based on the time zone where the document is created
- The next 6 digits are based on the GMT date when the document is created
- The last 8 digits are the number of hundreths of seconds that have passed in the day (again) based on the GMT.

If you wanted to use a tailored UNID, the fact that the first 16 digits of the UNID are random makes this portion of the UNID more suited to customization.  For example, you might decide to use a particular pattern for the first 16 digits dependent on a location or individual etc.

Den nachfolgende Code habe ich weggelassen, damit keiner damit Unsinn macht.

Andreas

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln