home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / 8953 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  1.4 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!rutgers!ub!acsu.buffalo.edu!ubvmsb.cc.buffalo.edu!v125qmam
  2. From: v125qmam@ubvmsb.cc.buffalo.edu (Ami R Pflugrad)
  3. Newsgroups: comp.databases
  4. Subject: Foxpro: Used() & File In Use
  5. Message-ID: <C0KAy2.E5M@acsu.buffalo.edu>
  6. Date: 9 Jan 93 01:05:00 GMT
  7. Sender: nntp@acsu.buffalo.edu
  8. Organization: University at Buffalo
  9. Lines: 29
  10. News-Software: VAX/VMS VNEWS 1.41
  11. Nntp-Posting-Host: ubvmsb.cc.buffalo.edu
  12.  
  13. Hi All!
  14.     Could someone tell me what's going on with my Foxpro Application.
  15.  
  16.     I Have a program that is called by many differnt apps, as a result
  17.     is has to be flexible enough to handle a variety of different 
  18.     file views.  Therefore I have it programmed to see if the file is
  19.     already open before proceeding.  Heres a portion of the code:
  20.  
  21.     IF Used("AcctMast")
  22.         Select AcctMast
  23.     Else
  24.         Select 5
  25.         USE \Foxpro2\Develop\FileMain\Accounts\Acctmast
  26.         EndIF
  27.  
  28.         Now, If the file is already used it will execute the first part
  29.     if not, it should execute the second part. 
  30.  
  31.     Here's whats happening....
  32.  
  33.     The File is not already in use when I call the program.
  34.          Therefore the Used() function returns a .F. and the second part of
  35.     the code is executed.  But when it encounters the USE \Foxpro2\etc.
  36.     statement, the app blows up with a "FILE IN USE" Error. 
  37.  
  38.     Can somone explain why its doing this?  
  39.  
  40.     Thanks so Much,
  41.     - Ami :)
  42.