home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5273 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  1.3 KB

  1. Path: sparky!uunet!olivea!hal.com!darkstar.UCSC.EDU!cats.ucsc.edu!isbell
  2. From: isbell@cats.ucsc.edu (Art Isbell)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: DBKit: updating key fields
  5. Message-ID: <152crfINN7ok@darkstar.UCSC.EDU>
  6. Date: 28 Jul 92 02:53:35 GMT
  7. References: <1992Jul28.002103.29635@midway.uchicago.edu>
  8. Organization: Cubic Solutions - NeXT software development and consulting
  9. Lines: 15
  10. NNTP-Posting-Host: am.ucsc.edu
  11.  
  12.  
  13. Possibly, DBKit is trying to protect you from Sybase (and maybe many other
  14. DBMS's).  Editting a key field is dangerous because Sybase implements an update
  15. as a delete followed by an insert.  If the change you have made to a unique key
  16. results in a duplicated key (another record with the same key exists), bye-bye
  17. record.  The insert fails but the delete has already occurred!
  18.  
  19. So maybe the correct way to change a key is to insert a new record with the key
  20. changed as you desire and if that succeeds, delete the previous record.
  21. -- 
  22.  
  23. Art Isbell                                                      Cubic Solutions
  24. NeXT Registered Developer #745         NeXT software development and consulting
  25. Email: isbell@cats.UCSC.EDU                                Voice: (408)335-1154
  26. USmail: 95018-9442                                           Fax: (408)335-2515
  27.