home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / bit / listserv / dbasel / 1379 < prev    next >
Encoding:
Text File  |  1992-12-21  |  2.0 KB  |  50 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!psuvm!auvm!CC.MSSTATE.EDU!JGB1
  3. Message-ID: <9212181439.AA00425@JayRell.CC.MsState.Edu>
  4. Newsgroups: bit.listserv.dbase-l
  5. Date:         Fri, 18 Dec 1992 08:39:34 CST
  6. Sender:       "Discussion on the use of the dBase language and related
  7.               dialects" <DBASE-L@NMSUVM1.BITNET>
  8. From:         John G Jay Burrell <jgb1@CC.MSSTATE.EDU>
  9. Subject:      Re: Packing a Database (Clipper 5.01 question)
  10. Lines: 38
  11.  
  12. > > In your message of 17 Dec 1992 at 1857 CST, you write:
  13. > > In article <9212172241.AA00396@JayRell.CC.MsState.Edu> John G Jay Burrell
  14. > > <jgb1@CC.MSSTATE.EDU> writes:
  15. > > >>
  16. > > >> Question:  How can I pack a subset of deleted records???
  17. > > >>
  18. > > >How 'bout:
  19. > > >        Copy to <new.dbf> for !( date>=CtoD('01/01/92') .AND. ;
  20. > > >                                 date<=CtoD('01/31/92')
  21. > > >                               )
  22. > > >        Erase <old.dbf>
  23. > > >        Rename <new.dbf> to <old.dbf>
  24. > > >
  25. > >
  26. > > Would this work in a multi-user enviroment???
  27. > >
  28. > >         Just Curious.
  29. > >
  30. > > Is there a more efficient way of doing this??
  31. > >
  32. > >         If this were a very large file, disk space may become a problem.
  33. > >
  34. > If your free space is running close enough that you can't mirror your
  35. > largest file, you're running too close to the edge ( 1/2 :) ).
  36. >
  37.         Amen!
  38.  
  39. This is EXACTLY what Pack does ( with out the condition, of course!) - you
  40. MUST have exclusive use of the database to pack and you must have exclusive
  41. use here to erase the file and rename...  Pack, too, simply copies all non-
  42. deleted records to a temp file, deletes the old, and renames the temp to
  43. the original filename....  Yes, pack requires the same amount of space - that's
  44. why it takes so long on large files to "remove" only a few records...
  45.  
  46.  
  47. Jay Burrell                    E-Mail: jgb1@CC.MsState.Edu
  48. Computing Center & Services     Voice: (601) 325-7025
  49. Mississippi State University      Fax: (601) 355-8921
  50.