Solved

Reading a text file.

Posted on 2014-07-28
1
275 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
1 Comment
 
LVL 51

Accepted Solution

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now