home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / database / sybase / 5 < prev    next >
Encoding:
Text File  |  1992-09-14  |  1.1 KB  |  28 lines

  1. Newsgroups: comp.databases.sybase
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!spool.mu.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.iastate.edu!howard
  3. From: howard@cs.iastate.edu (Chris howard)
  4. Subject: Re: Sequencer or Serial
  5. Message-ID: <howard.716504676@judy.cs.iastate.edu>
  6. Sender: news@news.iastate.edu (USENET News System)
  7. Organization: Iowa State University, Ames IA
  8. References: <howard.716498215@judy.cs.iastate.edu> <14821@gazette.bcm.tmc.edu>
  9. Date: Mon, 14 Sep 1992 21:04:36 GMT
  10. Lines: 16
  11.  
  12. mparsons@fleming.csc.bcm.tmc.edu (Mark Parsons) writes:
  13.  
  14. >Why not set up one table, with one column of type int.  Lock
  15. >the table when accessing/updating it.  The idea is that this
  16. >column will hold a counter . . . just increment the column
  17. >each time you read the number . . 
  18.  
  19. >Mark
  20.  
  21. Well, we thought of that, but we have been unable to determine how to
  22. get an exclusive lock on that column between the time that we read
  23. the counter, and the time it is updated.
  24.  
  25. The best answer we've come up with is to use a trigger on Update to
  26. grab the value after incrementing it.  It seems like a hack... at best.
  27.  
  28.