So if we see “John” in the listbox, the value of that item will also be “John”.

We could have given it a different value than what it shows.

Just like you can give each option item in HTML select boxes a different value than its actual list item name.

The advantage of this method is that it is a quick “dump all the info here” method.

Almost on a daily basis we run across posts that ask about using a . Oh it might have a slight variation like “How do I load a value from a database into a textbox?

” or “How do I read a database into _______ control and then update the database?

It is also good in that it is directly tied to the dataset itself.

So if we modify the dataset, the listbox automatically changes as well.

Like if we wanted to make sure that each name is properly capitalized we could do that before adding it to the list Box1. The last method here for selecting data is using a command object and fetching what is called a “Reader”.

This method is especially common because the command object is very flexible and good not only for select queries, but for updates, inserts and delete queries as well. We will use it again to show you a simple update in a second.

Another beautiful thing about using a Reader to move through data is because they are “forward only”.

Since you can only move to the next record at a time and can’t go back, .

The first example will be to use a Data Adapter class and its fill method to load it into a Data Set.