Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening and closing text files

Status
Not open for further replies.

twix79

IS-IT--Management
Apr 5, 2002
110
US
I have a set of files that are shared between two applications. The first writes to the file, the second reads from it. I am opening and closing the text files each time the applications either read or write to them. These applications will be running 24/7 with a fairly steady stream of data running between them. I attempted several other methods of passing the data prior to choosing this file method, but this was the only one that has worked so far. My question is: Does constantly opening and closing the files create any potential problems?

Thank you.
 
Yes, you could have a conflict where one is writing to it and the other wants to read from it.

I would suggest using a DB, like MSAccess. You don't even need to have Access to do this, you can create the DB, in ADO and then attach to it with ADO. This can easily be shared as long as your record locking is set properly.

If your just sharing say a small setting you might want to use the Windows registry instead. Craig, mailto:sander@cogeco.ca

"Procrastination is the art of keeping up with yesterday."

I hope my post was helpful!!!
 
You might want to consider using mailslots or named pipes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top