Solved

Reading a text file.

Posted on 2014-07-28
1
284 Views
Last Modified: 2014-08-20
Hi,
Can anybody suggest some code that would allow me to open and then read a text file and then return the results within a datatable?
The complicated element is that this code will run inside a Window Service so I only want to read entries that have been written within the past 24 hrs.  

The log data looks like this:

25/07/2014 15:55:55 - Log Data
25/07/2014 16:05:57 - Log Data
25/07/2014 16:05:58 - Log Data
28/07/2014 07:41:43 - Log Data
28/07/2014 08:10:27 - Log Data

There can be any number of logs written and each is usually under 255 characters.

TIA
0
Comment
Question by:andyw27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 57

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 40223650
Are you able to store and maintain the last position you processed up to (another file, registry)?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question