Chapter 23. Accessing Data Sources in a Windows Forms Application
In this chapter, you'll investigate how you can develop form-based applications that will display data from a variety of sources and specifically how you can create form-based programs to access an existing database. In this chapter, you will learn about:
What kind of classes are involved in encapsulating a data source
How you can use the
DataGridView
control to display your own dataHow you can customize the appearance of a
DataGridView
controlWhat the function of the
BindingSource
component is and how you use it with aDataGridView
controlHow you use a
BindingNavigator
control to navigate data from a source managed by aBindingSource
controlHow you expedite updating of a database using a
BindingNavigator
control and aBindingSource
component
Note
Visual C++ 2008 provides a high degree of automation for creating Forms-based applications that access data sources but you will start by ignoring the automation and get a feel for how you can work with components programmatically. With this approach, you'll not only get a good insight into how things work; you'll also appreciate how much the automation is doing for you.
Working with Data Sources
A data source is any source of data for your application; relational databases, Web services that access data, and objects can all be data sources. When you are developing an application that will work with an existing data source, you will usually need to identify the data source within ...
Get Ivor Horton's Beginning Visual C++®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.