O'Reilly logo

Beginning Microsoft® Visual Basic® 2008 by Bryan Newsome, Thearon Willis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Accessing Databases

Most applications manipulate data in some way. Visual Basic 2008 applications often manipulate data that come from relational databases. To do this, your application needs to interface with relational database software such as Microsoft Access, Microsoft SQL Server, Oracle, or Sybase.

Visual Studio 2008 provides the data access tools and wizards to connect to these databases and retrieve and update their data. In this chapter, you will look at some of these tools and wizards and use them to retrieve data from a database.

In Chapter 17, you will concentrate more on writing code directly, which gives you more flexibility and control than relying on Visual Studio 2008 to create it for you. With practice, writing code will also take less time than working through a wizard.

In this chapter, you will:

  • Learn what a database really is

  • Examine the SQL SELECT statement

  • Examine data access components

  • Examine data binding in Windows Forms

  • Use the data access wizards in Visual Studio 2008

Note that in order to work through the exercises in this chapter, you will need Microsoft Access 2000 or later.

What Is a Database?

A database consists of one or more large, complex files that store data in a structured format. The database engine, in your case Microsoft Access, manages the file or files and the data within those files.

Microsoft Access Objects

A Microsoft Access database file, which has the extension mdb, contains tables, queries, forms, reports, pages, macros, and modules, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required