In this chapter, you will learn the following:
In this chapter, we'll explore how Visual Basic .NET is used to interact with databases. Basically, you have two ways in which to work with databases. First, you can use the wizards that Visual Basic .NET provides to create the skeleton database code. A second way is to forego the wizards and create the code yourself. We'll do both in this chapter. We'll also use the old-style ActiveX Data Object (ADO) along with ADO.NET to interact with a sample database.
Throughout this chapter, we assume that you're working with an Access database. However, the methods used in this chapter apply equally well to Microsoft's SQL Server, Oracle, and other popular databases. (Indeed, some Visual Basic .NET programming elements have been optimized for SQL Server for obvious reasons.) In those instances in which the database flavor makes a difference, I'll point this out to you. When you've finished this chapter, you'll be able to read and write database information using Visual Basic .NET.