Re: record numbers



Mario wrote:
Maybe my question is stupid and wrong but I hope that you will understand. So, image that you need to create web application which will used by many peoples in one LAN. They processing some documents and every person has the particular number of documents in particular order (1. person has documents from 1 to 100, second from 101 to 200 etc), which process with the particular number (first document -> number 1 in a database). If they all work in a same time, what is the easiest and the most safety way to manage that? Adding number manually is the logical solution but if 2 person put the same number, can they freeze the database or databases are imune on that ?

Many databases allow you to define a column in a table as being "serial". These have their value allocated by the DBMS when you insert a record and are guaranteed to be unique.

Most databases allow you to define that a certain column in a table be "unique". The database will report an error if a second person tries to add a record with the column set to a value that has been already used.

As Roedy suggested, it's almost certainly not a good idea to pre-allocate a fixed range of document numbers to each user. I'd include the user_ID in the "document" table as (say) "author_ID".
.



Relevant Pages

  • Re: Replication: Alternatives?
    ... > copy of the database. ... > cannot be connected to the LAN. ... If they can *never* be connected to the LAN, replication is ... single point of connection between the LAN and outside the LAN. ...
    (microsoft.public.access.replication)
  • Re: Very slow response
    ... If you open a new Access database, select Tools, Options ... ... has been set to something on the LAN? ... > I entered Access, open the database file ... > Then I enter the report's design view to edit the report layout ...
    (microsoft.public.access.reports)
  • Re: record numbers
    ... Mario wrote: ... peoples in one LAN. ... can they freeze the database or databases are imune on that? ...
    (comp.lang.java.databases)
  • Re: User Groups
    ... Knowing about the LAN is the key to getting this to work, Crystal, so if you ... > database just on different computers in the office. ... > "Rick B" wrote: ...
    (microsoft.public.access.modulesdaovba)
  • Re: Print over a network
    ... All computers having their ODBC settings to a ... common datatabase should easily share the same database. ... Printing to a particular printer in LAN is easy. ...
    (microsoft.public.vb.general.discussion)