home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / database / 8549 < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.8 KB  |  46 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!comm.mgmt.purdue.edu!landers.mgmt.purdue.edu!landers
  3. From: landers@comm.mgmt.purdue.edu (Chris Landers)
  4. Subject: Re: Clipper...Set Unique On/Off
  5. Sender: news@comm.mgmt.purdue.edu (News owner)
  6. Message-ID: <landers.131.724601024@comm.mgmt.purdue.edu>
  7. Date: Thu, 17 Dec 1992 14:03:44 GMT
  8. Lines: 34
  9. References: <18587@mindlink.bc.ca>
  10. Organization: Krannert Graduate School of Management, Purdue University
  11.  
  12. In article <18587@mindlink.bc.ca> John_Carson@mindlink.bc.ca (John Carson) writes:
  13. >
  14. >It has come to my attention on a client program that SET UNIQUE ON/OFF can be
  15. >the start of corrupted index files. 
  16.  
  17. Yes, this can cause problems if you're not aware of it.....
  18.  
  19. >I assume that if you SET UNIQUE once with
  20. >the database you must all the time. If at some location in the .PRG'S it
  21. >isn't....trouble begins. 
  22.  
  23. Your assumption is wrong.
  24. Any index created or reindexed with SET UNIQUE ON will be a UNIQUE index, 
  25. that is, only the first occurance of the key will be included in the index 
  26. making the database appear as if it has no duplicate records.
  27.  
  28. Once an index has been created UNIQUE, it is always UNIQUE, regardless of
  29. the status of SET UNIQUE.  My advice is to SET UNIQUE ON just before 
  30. creating or reindexing an index you want UNIQUE, then set it OFF immediately 
  31. after.
  32.  
  33. >Has anyone else had this problem?
  34. >
  35. >What pseudo code do you suggest do to solve duplicate records without using
  36. >this SET UNIQUE ON/OFF.
  37. >
  38.  
  39. Sorry, I don't have any handy.
  40.  
  41.     <================================><=================================>
  42.     ||  Christopher Landers          ||  Purdue University - KRAN 708  ||
  43.     ||  Krannert Computing Center    ||  West Lafayette, IN  47907     ||
  44.     <=================== landers@comm.mgmt.purdue.edu ==================>
  45.  
  46.