remove/delete disk files 
Author Message
 remove/delete disk files

C5ee   /  ABC   /   Windows98

My procedure uses tagging and edit-in-place and several calculations to
manipulate temporary records and then copy the tagged ones to a
permanent file.

To make a TEMPORARY file, I use the COPY command to make a local on-disk
copy of one reference file from the shared directory.  That way every
user gets a clean, fresh start from the common standard file but works
locally making changes to the temporary file.  The procedure deletes the
temporary file (REMOVE) on exit.  [I check for file existence on entry
and first delete the temporary file if it already exists before the
COPY.  That part works.]

The temporary file relates to one parent (LOOK-UP) file for one of its
fields ("must be in file").

PROBLEM:  The first time in, everything works with both files.  If I
exit the procedure and then come back into it, I ALWAYS get the "file
not open" error accessing the related LOOKUP file.  The error message
always displays twice and then the procedure aborts (returns me to the
calling procedure).

If I go back to the main FRAME (close ALL contained MDI windows), then I
can open up the thread and get into the faulty procedure again ONCE.

***************

I've looked up several manuals to learn about file creating and
removing, but I'm not getting straight instructions for this problem.
Does anyone know what I must still do?

In my file schematic, I show the temporary file as the primary file and
then relate the lookup file to it.  It seems irrelevant whether I ALSO
list the lookup file in the "other files" section.  If I list it there
("other), then there is an explicit statement

RELATE:Taxrates.Open

in ThisWindow.Init, but it makes NO improvement to the problem.  I think
I HAVE to show the relation to the primary file, because the
calculations depend on looking up the proper tax rate for each line
item.  If I do not put the lookup file also under "other" then there is
no explicit reference to it at all (neither open nor close), but it
STILL WORKS ONCE before giving me the "file not open" error #37.

The lookup file is NOT open in the calling procedure.

TIA for any help on this!

--

Kent V. Busse, J.D.; A:COMPUTER.WIZ
Custom Software Development Laboratory
  Outsourcing for RESULTS!
  free-trial software at
  http://www.*-*-*.com/ ~Awiz/



Wed, 28 Nov 2001 03:00:00 GMT  
 remove/delete disk files

Quote:
> PROBLEM:  The first time in, everything works with both files.  If I
> exit the procedure and then come back into it, I ALWAYS get the "file
> not open" error accessing the related LOOKUP file.  The error message
> always displays twice and then the procedure aborts (returns me to the
> calling procedure).

This means your opens and closes are out of sync. They must match.  If
the file you are deleting is the primary file then thiswindow.init is
opening it and thiswindow.kill is closing it even if the file has been
deleted.  If you delete the file every time I would prevent the
Relate:file.Close() from being called in this window kill by putting
Omit('***') in the embed before the close and *** in the embed after.
Then call relate:file.close() before removing it -or- remove the file in
one of the embeds after the relate:file.close() near the very end of
thiswindow.kill.
---
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!
www.fkeeps.com


Wed, 28 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. deleting (remove) a file

2. Finding files on a given disk on other accessed disk

3. Large data array (operations) via disk disk files

4. Delete all files in Dir or delete Dir

5. dBase4 - remove deleted records

6. Remove or Delete : range of dates

7. Delete and Remove with 0

8. HELP: Need to remove delete icon!

9. How do i remove file loaded combo from file schematic of window

10. disk file reads slow down for file sizes greater than 2 GB

11. Delete file on file server

12. need help with rename-file/delete-file

 

 
Powered by phpBB® Forum Software