home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / 8963 < prev    next >
Encoding:
Text File  |  1993-01-09  |  1.2 KB  |  42 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!dell32.ortta.umn.edu!durai
  3. From: durai@ortta.umn.edu (Durai Venkatasubramanian)
  4. Subject: Re: Foxpro: Used() & File In Use
  5. Message-ID: <durai.124.726599183@ortta.umn.edu>
  6. Lines: 28
  7. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  8. Nntp-Posting-Host: dell32.ortta.umn.edu
  9. Organization: U of Mn
  10. References: <C0KAy2.E5M@acsu.buffalo.edu>
  11. Date: Sat, 9 Jan 1993 17:06:23 GMT
  12. Lines: 28
  13.  
  14. In article <C0KAy2.E5M@acsu.buffalo.edu> v125qmam@ubvmsb.cc.buffalo.edu (Ami R Pflugrad) writes:
  15. >From: v125qmam@ubvmsb.cc.buffalo.edu (Ami R Pflugrad)
  16. >Subject: Foxpro: Used() & File In Use
  17. >Date: 9 Jan 93 01:05:00 GMT
  18. >Hi All!
  19. >
  20. >    IF Used("AcctMast")
  21. >        Select AcctMast
  22. >    Else
  23. >        Select 5
  24. >        USE \Foxpro2\Develop\FileMain\Accounts\Acctmast
  25. >        EndIF
  26. >
  27.  
  28. Used() will return T or F, after checking the current work area, or the work 
  29. area specified within the used().  Unfortunately, it does not seem to check 
  30. all the work areas for an open file, wait, unless you open the file with an 
  31. alias.  With an alias, it somehow seems to work.  
  32.  
  33. Try this:
  34.  
  35. if used("acctmast")
  36.  select acctmaster
  37. else
  38.  select 5
  39.  use acctmaster alias acctmast
  40. endif
  41.  
  42.