` Making sure a file is actually closed (C4) (Jim Katz) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

ABC: Making sure a file is actually closed (C4)
1998-09-08 -- Jim Katz
 
Newsgroups: topspeed.products.c4 > There are a few things here that are problematic. When you close the > bank file the filemanger loses track of the file open state, and > therefor it's not open when you call Access:Bank.Open() as it thinks > the file is already open, so why open it again? You CAN use > Access:Bank.Close() but as you found out, it may or may not close the > file. There was a thread about how to unconditionally close a file > and still keep track of the open state of the file a few months back - > maybe you should have a look in one of the knowledgebases and see if > we archived any of it (I certainly hope so) Here is some code I posted a while back: Loop Open(ConType,ReadWrite) IF Errorcode() = 52 ! File Already Open Relate:ConType.Close Else Close(Contype) Break End End This just insures that the _actual_ closed state is in sync with what the filemanager _thinks_ the closed state is.


Today is November 21, 2024, 3:29 am
This article has been viewed 35373 times.
Google search has resulted in 5 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: