Chapter 1. Developing Windows Forms Using Bound Controls

In this chapter you will

Visual Basic .NET, one of the languages that ships with Visual Studio .NET, is a far more robust language than what was found in Visual Basic 6.0. Now, before you VB 6 developers go off and start cussing me for saying this, read on.

As in previous versions of Visual Basic, you can use code to bind controls manually, which takes more work than using bound controls. The other method is to use data bound controls, which in the past were avoided because of not having total control over the way data is handled. In VB .NET, Microsoft has done a better job of not only creating the data bound controls, but because everything is class-based in the .NET languages, you also can see the code that is generated when you place data bound controls onto a form.

In the prior versions of Visual Basic, the Microsoft Jet Database Engine was the database flavor of choice for small- to medium-sized databases, as well as books such as this one. Now, Visual Basic ships with the Microsoft SQL Server 2000 Desktop Edition (MSDE). This is a scaled-down version of SQL Server 2000, allowing you to create databases on your local machine and then distribute them for use on a user's individual local version of the MSDE or a larger SQL Server 2000 installation. If this sounds intimidating, don't worry. You will learn how to use SQL Server from within Visual Studio and your application. This includes creating utilities for connecting to new databases, as well as backing up and restoring databases.

Although this book uses the MSDE for the database, you only have to adjust the ConnectionString property of the OleDbConnection object on forms and the ConnectionString property of the OleDbConnection object discussed in Chapter 4, "Manipulating Data with ADO.NET." In the code in Chapter 4, you will see a commented line of code that provides an example of using a Jet database version of Northwind.