Re: Multiuser record lock query?
From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 03/30/04
- Next message: Alain Beaulieu: "NOT YOUR STANDARD QUESTION: SQL UPDATE in Disconnected Recordset"
- Previous message: Gitendra Proctor: "Re: Multiuser record lock query?"
- In reply to: Gitendra Proctor: "Re: Multiuser record lock query?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Mar 2004 16:16:06 -0800
In this case use a GUID. It's a guaranteed unique identifier that you never
have to worry about. Identity columns are useful, but in your case, since
you're (apparently) trying to keep rows in more than one table unique (not
sure why or if it makes sense in a relational database), the Identity column
(autonumber) is not a good choice. Is this a value that the user must enter?
If so, a GUID is too long. In this case (so to speak), I would generate a
table of unique numbers ahead of time and "use" these as new unique numbers
are needed. It's easy to do and fast--and there's no chance of collisions.
When a new number is needed, do a SELECT on the TOP 1 (oops JET/Access does
not support this)... the first row from this table and delete it. Of course
with JET (which I don't recommend), you'll have to purge/compress your
database from time to time to clear out the detritus.
I guess this is a silly question, but why aren't you using MSDE for this?
Aren't you worried about security, scalability, stability and speed or is
this a government project where things like that aren't important? ;)
-- ____________________________________ William (Bill) Vaughn Author, Mentor, Consultant Microsoft MVP www.betav.com Please reply only to the newsgroup so that others can benefit. This posting is provided "AS IS" with no warranties, and confers no rights. __________________________________ "Gitendra Proctor" <gproctor@ihug.com.au> wrote in message news:DA72049A-CECF-4BB9-86C0-C3DCF19AD0D0@microsoft.com... > Hi! > I am unfamilier with the term "Identity column", I looked up the documentation and as I understand it is much like the autonumber feature in MS ACCESS. I have used the autonumber (identity column) feature, when I wanted an unique sequentially incremented number for one table. > > Here I have multiple tables, and I need a single unique sequential number (It's a docket number) each time a record is added to any of the tables. > > Please let me know if this is the right interpretation of "Identity Column". Thankyou for taking the time to answer my query. > > Regards > Gitendra
- Next message: Alain Beaulieu: "NOT YOUR STANDARD QUESTION: SQL UPDATE in Disconnected Recordset"
- Previous message: Gitendra Proctor: "Re: Multiuser record lock query?"
- In reply to: Gitendra Proctor: "Re: Multiuser record lock query?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|