VB.NET Tutorial For Beginners – Reading File Data with StreamReader (Visual Basic .NET)

In this beginner Visual Basic .NET programming tutorial, I’ll be teaching you how to read information from a file using the .NET StreamReader.

Tutorial Features:
VB.NET StreamReader – Open and Read data from a file
OpenFileDialog – Browse computer for files
VB.NET Form Controls – TextBox, Command Button


Carlos Alberto Araujo says:

I have a question on this project:
– is there a way to pass an entire Table (from Access) to this gadget, and “paste” it to a LOCAL DATABASE (Table) in SQL ?
Meaning… a Table from Access, can be “copied” to a SQL Table, in a single operation ?
Thanks, VB Toolbox !

Olaf Wrieden says:

Thank you for the excellent tutorial, this just helped me out a lot!!
But one question: What if I want the file reading process to refresh every say 3 seconds, I want to be able to write stuff into the .txt file and make the textbox refresh with the new content automatically without having to load the file again.
How do I do that? Could you give me the line(s) of code that would make this possible, Thank you so much.

Anthony Joseph says:

Hi thank you very much, way of your explain is very important .. you doing great and you know how to explain.. and very helpful your tutorial..

thank you vry much

Kishori B says:

Hi,Thank you so much for your tutorial. Its simple and easy.In the same way can you please help us to read excel file using vb.net and xml file using vb.net..Its a request..Hope to see this videos soon..

Chris Read says:

Hi..  You were ery helpful when I posted a question on one of your other videos!    I see you are using an OpenFileDialog in this tutorial. I’ve been trying to use one this morning but the tool doesn’t appear on my Toolbox.  I’ve deduced, through a lot of searching about the web, that this is because I’m building a Web Forms application not a windows form….  Are file dialogue boxes not usable within a Web Forms application.    I’m trying to build a web based application based on a database but I want to give the user the option to load extra data from Excel.


Pitaberto says:

How can I make a line counter on the file?

KENU死 says:

sjutzt post theese fuckjig s hiz in ur description man

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!