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
statementExamine 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, ...
Get Beginning Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.