Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Opening file for reading and writing

I'm building an application that logs data continuously to a file. However, periodically I want to search the log and read data from a specific point in the file, while allowing the log to be continually updated.

Can I do this without closing the file? How do I go about this?

Many thanks,

Michael

0 Kudos
Message 1 of 2
(2,907 Views)
The file system is really not suited for the type of operation you're trying to perform.
 
I'd suggest using a database of some sort - check out microsoft sql server express 2005 - it's free for database sizes up to 4GB, and interfaces very nicely with visual studio 2005. There's a bit of a learning curve, but the functionality payoff is well worth it.
 
(Our company started out logging data to the file system, and the transition to a database later rather than sooner caused alot of headaches)
0 Kudos
Message 2 of 2
(2,868 Views)