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