Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Numbering on Notes DB

Status
Not open for further replies.

kev1609

IS-IT--Management
Aug 16, 2002
4
GB
Hi

Wonder if anyone could offer some help - I've just designed my first database and now I wish to add autonumber to one of the fields, but I'm unsure of how to do this

 
I am supposing you wish to implement sequential document numbers.
You need to be very careful on doing this. First thing is : Notes is not capable of doing sequential numbering for multiple authors. It is against the philosphy of a distributed environment. The issue is, since a Notes db can be replicated, there is no guarantee that two users in seperate replicas will avoid creating a doc with the same number.
If you can avoid replicating the db, then you can try a number doc in a special view, with semaphore-type access and hope it will hold out. If it works, it will only work until the day someone replicates the db to another server, or locally.
The best, safest way to do sequential numbering in Notes is per user. Each user can have a profile doc with his number, and that will be incremented normally. Of course, this supposes that only one user is using the ID at the time.
As you can see, putting a sequential number on a document is not an easy task.
Does this answer your question ?
 
I am an administrator and am not familiar with the coding for all of this in our applications. But it might point you in the right direction.....

In our environment we have several applications on 3 clustered servers, all of which depend on sequential order numbers for all new documents. We have installed MS SQL server on one of the boxes and our applications query that for their numbers.

The SQL server tables are simple as all they do is contain the low and high limits for the numerical range, and the last number assigned to a request. The logic is simple as well, as all it does is increment the number, hand it out, then store it.

 
That is indeed a good way of dealing with the numbering task. Unfortunately, you need another product to achieve that functionality.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top