VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB Expert!

Join 300,440 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,501 people online right now. Registration is fast and FREE... Join Now!




Need Help Making a Program To Read Text Files

 

Need Help Making a Program To Read Text Files

Altheriax

30 Jun, 2009 - 12:25 PM
Post #1

New D.I.C Head
*

Joined: 30 Jun, 2009
Posts: 1

Hi guys,
I'm a complete newbie here and to VB.net in general. My friend for his company has written a program to tell if machines within his workplace are actually doing anything. The results from this are then shown in a text file, which I will show a small part of now:
Server to Check : AC01VS007c

Date Stamp : 26/06/2009

Time Stamp : 08:15

SQL Script Used : C:\Support\ServerChecks\Opp_SQL_Script.sql

--------------------------------------------------------------------------------------------------------

Name

------------------------------

CES Manager 3.08.012



Name

------------------------------

SIS Translator 20.2.1



Name

------------------------------



Name

------------------------------



Name

------------------------------

CDS 22.1 WHO TR3



TODAYS DECLARATIONS

Number of Meetings

------------------

19



Number of BTG_OPTYS

-------------------

199



ODEC MESSAGES RECEIVED

Meetings

-----------

19



Events

-----------

195





--------------------------------------------------------------------------------------------------------

Server to Check : AC01VS014a

Date Stamp : 26/06/2009

Time Stamp : 08:15

SQL Script Used : C:\Support\ServerChecks\Opp_SQL_Script.sql

--------------------------------------------------------------------------------------------------------

Name

------------------------------

CES Manager 3.11.006

Central System 20.0.3.0



Name

------------------------------

SIS Translator 20.2.1.2



Name

------------------------------

PA Translator 22.0.5.0



Warning: Null value is eliminated by an aggregate or other SET operation.

Name

------------------------------



Name

------------------------------

CDS 22.1 WHO TR3



TODAYS DECLARATIONS

Number of Meetings

------------------

0



Number of BTG_OPTYS

-------------------

0



ODEC MESSAGES RECEIVED

Meetings

-----------

0



Events

-----------

0





--------------------------------------------------------------------------------------------------------

Server to Check : AS02VS035S

Date Stamp : 26/06/2009

Time Stamp : 08:15

SQL Script Used : C:\Support\ServerChecks\Opp_SQL_Script.sql

--------------------------------------------------------------------------------------------------------

Name

------------------------------
The problem with this is that it is very hard to read and takes unecessary time scrolling through to find whether it is working or not. If the meetings and events add up to 0 then obviously the machine isn't working.
What he has assigned me to do is put this information into a form which is simple and easy to read. I have successfully created a DataGridView which shows the Name of Machine, Status, Date Stamp and Time Stamp. However, this is only reproduced by entering the data manually into the source code eg.
CODE
DataGridView1.Rows.Item(n).Cells(4).Value = "26/6/2009"
DataGridView1.Rows.Item(n).Cells(5).Value = "08:15"

for Date and Time Stamps.
So what I'm trying to do is be able to change the program so it can search the text file for the machine name, add up all of the events and meetings for that machine and store it as an integer which can be updated straight to the DataGridView, and do the same for the Date Stamp and time Stamp. I hope all of this makes sense and I would really appreciate your help because I don't have a clue of where to start.

User is offlineProfile CardPM
+Quote Post


MajorWalrus

RE: Need Help Making A Program To Read Text Files

30 Jun, 2009 - 01:46 PM
Post #2

D.I.C Head
**

Joined: 22 Apr, 2009
Posts: 97



Thanked: 9 times
My Contributions
This tutorial should give you something to start from. Come on back when you've go some code and we'll be glad to help you.

Good luck.
User is offlineProfile CardPM
+Quote Post

PsychoCoder

RE: Need Help Making A Program To Read Text Files

30 Jun, 2009 - 03:43 PM
Post #3

Dyslexics Untie!
Group Icon

Joined: 26 Jul, 2007
Posts: 14,714



Thanked: 501 times
Dream Kudos: 11450
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: code.gif

Thanks.
User is offlineProfile CardPM
+Quote Post

vb5prgrmr

RE: Need Help Making A Program To Read Text Files

30 Jun, 2009 - 08:29 PM
Post #4

D.I.C Regular
***

Joined: 21 Mar, 2009
Posts: 459



Thanked: 30 times
My Contributions
and post your q's in the correct forum. this is classic VB and not .NET
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 01:12AM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month