This tutorial is part of Database Programming Made Easy Series.
Without Windows Forms your application may look like a DOS application, running in a black and white screen without a Graphical User Interface.
This tutorial will discuss on how to use different controls like TextBox, Label, ComboBox, Button, CheckBox, and finally the ListView Control to access data from our database.
We will use the code from the previous tutorial so you will have a better understanding on how to integrate those codes in different controls mentioned above.
This tutorial is limited only to the use of various controls above. If you want to know better about windows form I suggest you buy a book called “Microsoft Visual Basic 2008 Step by Step”.
Even if you are a beginner, most probably you know what a Label and a TextBox Control is. Our goal for today is to retrieve data and put it in a TextBox and give it a descriptive title in a Label Control.
In our previous example you retrieve the data and show its output in a temporary textbox called remarks. We do that just to simplify our code.
Now we will go to the heart of Visual Basic .NET. Let us create our first Windows Form project to be use through the rest of the tutorial.
[inline:New Project Dialog.jpg=New Project Dialog]
As you may know that there are different ways to access or retrieve data from a database. One is by using a Data Reader and other is using a Dataset and Data Adapter.
You can also save the data back to the database using ExecuteNonQuery Command or by using again a Dataset and Data Adapter.
Previous: How to Modify Data Using Datasets and Data Adapters