Output EVERYTHING from a text file to screen...-VBForums
Results 1 to 4 of 4

Thread: Output EVERYTHING from a text file to screen...

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2012
    Posts
    5

    Output EVERYTHING from a text file to screen...

    I currently have a system that saves student data to a text file. I can search for individual students and have their information output to screen. How can I make my system output every student in the text file to screen?

    Thanks,
    TomByrne94

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    86,138

    Re: Output EVERYTHING from a text file to screen...

    You need to be a bit more specific than "to screen". How exactly do you want the data displayed? Surely if you know how to display one record then you know how to display all of them. If you know how to take one step then does that not automatically mean that you know how to walk down the street? It's just taking one step multiple times.

    2007-2014

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2012
    Posts
    5

    Re: Output EVERYTHING from a text file to screen...

    At the moment I search for a particular student and then run this code to output their data.

    vb Code:
    1. Console.WriteLine("ID: " + student.ID.ToString)
    2.             Console.WriteLine("First Name: " + student.StudentFName)
    3.             Console.WriteLine("Second Name: " + student.StudentSName)
    4.             Console.WriteLine("Criteria One: " + student.L1Criteria1)
    5.             Console.WriteLine("Criteria Two: " + student.L1Criteria2)
    6.             Console.WriteLine("Criteria Three: " + student.L1Criteria3.ToString)
    7.             Console.WriteLine("Criteria Four: " + student.L1Criteria4.ToString)
    8.             Console.WriteLine("Criteria Five: " + student.L1Criteria5.ToString)
    9.             Console.WriteLine("Criteria Six: " + student.L1Criteria6.ToString)
    10.             Console.WriteLine("Criteria Seven: " + student.L1Criteria7.ToString)
    11.             Console.WriteLine("Criteria Eight: " + student.L1Criteria8.ToString)
    12.             Console.WriteLine("Criteria Nine: " + student.L1Criteria9.ToString)
    13.             Console.WriteLine("Criteria Ten: " + student.L1Criteria10.ToString)
    14.             Console.WriteLine("Criteria Eleven: " + student.L1Criteria11.ToString)
    15.             Console.WriteLine(" ")

    How can I skip out searching for a particular student and then outputting all of the students one by one in that format?

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    86,138

    Re: Output EVERYTHING from a text file to screen...

    You are again relying on our mind-reading powers. If we don't know how you're getting that one record then how can we tell you how to change it to get them all? We could guess but, if we're wrong, we've wasted our time and yours. Presumably you have some sort of filter in place so simply remove that filter and you'll get all records. I can't be more specific than that without knowing, or guessing, exactly how the filtering is done. Once you've got all the records then you can just loop through the list and do the same inside the loop as you're already doing for your one record.

    2007-2014

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts) | WP8 Turnstile Feather Transition with Pivot Control
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.