
Personally for this I would not use a text file at all. Use an InProc database like SQLLite or if you're writing from multiple threads like from a web app, something thread safe like SQL Compact. Easier to manage, easier to query, easier to report off On Wednesday, February 29, 2012, aki wrote:
In the build towards the wiki type thing, I've got 2 files as follows:
- File A contains the original data that is being updated say every 10 minutes. Therefore this file contains say the monitored statistics from say e.g 8am to 9am. The next automatic updated data will be available at 910am, which contains the data from 810am to 910am.
- File B contains the data from File A but has been transformed to capture the entire data over a 24 hours cycle.
*Here's the question:*
- In File A and B, there's a clash of repetition data as follows. Between each update on File A between 810-910am, File B has to check for only the updated data between 9am-910am as it already has the other data between 8am-9am. The search criteria of course is the date & time field.
*How can I use a search criteria into a string for comparison for File B when the data File A is not static and changes every 10 minutes? *
So the data in File A example is as follows in realtime:
....contains the data from 0810am <raw_data>29/02/12-0900</raw_data> <raw_data>29/02/12-0901</raw_data> <raw_data>29/02/12-0902</raw_data> <raw_data>29/02/12-0903</raw_data> <raw_data>29/02/12-0904</raw_data> <raw_data>29/02/12-0905</raw_data> <raw_data>29/02/12-0906</raw_data> <raw_data>29/02/12-0907</raw_data> <raw_data>29/02/12-0908</raw_data> <raw_data>29/02/12-0909</raw_data> <raw_data>29/02/12-0910</raw_data>
And in File B example is as follows:
.....contains the data from 0800am-0900am but needs only the data between 0900-0910am.
Hope I've written the question properly.
Any recommendations welcome. :-)