Teach yourself the fundamentals of ADO.NET 2.0—one step at a time. With this practical, learn-by-doing tutorial, you get the guidance you need to start creating data centric applications for Microsoft Windows and the Web.
Discover how to:
Work in the Microsoft Visual Studio 2005 development environment
Use the ADO.NET 2.0 classes in either Visual Basic or Visual C#
Connect to and manipulate different data sources: Microsoft SQL Server, XML, OLE DB
Create ADO.NET objects at either design time or run time
Use visual design tools
Sort, filter, and manipulate data
Build data-bound Windows Forms and Web Forms
Work with validation controls
Read and write XML data and schemas
CD features:
Code samples
Sample databases
A Note Regarding the CD or DVD
The print version of this book ships with a CD or DVD. For those customers purchasing one of the digital formats in which this book is available, we are pleased to offer the CD/DVD content as a free download via O'Reilly Media's Digital Distribution services. To download this content, please visit O'Reilly's web site, search for the title of this book to find its catalog page, and click on the link below the cover image (Examples, Companion Content, or Practice Files). Note that while we provide as much of the media content as we are able via free download, we are sometimes limited by licensing restrictions. Please direct any questions or concerns to booktech@oreilly.com.
Getting Started with ADO.NET
Chapter 1 Getting Started with ADO.NET
On the Fundamental Interconnectedness of All Things
The ADO.NET Object Model
Creating a Simple Data-Bound Form
Summary
Data Provider Objects
Chapter 2 Using Connections
Understanding Connections
Creating Connections
Configuring Connections
Connection Methods
Summary
Chapter 3 Using Data Commands and DataReaders
Understanding Data Commands
Creating Data Commands
Configuring Data Commands
Command Methods
Understanding DataReaders
Creating DataReaders
DataReader Methods
Summary
Chapter 4 Using DataAdapters
Understanding DataAdapters
Creating DataAdapters
Configuring DataAdapters
Using DataAdapter Methods
Responding to DataAdapter Events
Summary
Chapter 5 Transaction Processing in ADO.NET
Understanding Transactions
Using Transactions
Creating Transactions
Creating Nested Transactions
Committing and Rolling Back Transactions
Summary
Data Provider Objects
Chapter 6 Modeling a Database by Using DataSets and DataRelations
Understanding DataSets
Creating DataSets
Configuring DataSets
Using DataSet Methods
Understanding DataRelations
Creating DataRelations
Configuring DataRelations
Summary
Chapter 7 Using DataTables
Understanding DataTables
Creating DataTables
Configuring DataTables
Creating DataColumns
Configuring DataColumns
Adding Constraints
Creating DataRows
Configuring DataRows
Using DataTable Methods
Using DataRow Methods
Responding to DataTable Events
Summary
Chapter 8 Using TableAdapters
Understanding TableAdapters
Creating TableAdapters
Configuring TableAdapters
Using TableAdapter Methods
Summary
Chapter 9 Using DataViews
Understanding DataViews
Creating DataViews
Configuring DataViews
Using DataView Methods
Summary
Manipulating Data
Chapter 10 Editing and Updating Data
Understanding the Editing and Updating Process
Understanding DataRowStates and Versions
Editing Data in a DataSet Under Program Control
Updating Data Sources
Summary
Chapter 11 Manual Data Binding in Windows Forms
Understanding Data Binding in Windows Forms
Binding Controls to an ADO.NET Data Source
Understanding the BindingContext Object
Understanding the CurrencyManager Object
Responding to CurrencyManager Events
Understanding the Binding Object
Configuring the Binding Object
Using Binding Object Methods
Responding to Binding Object Events
Summary
Chapter 12 Data Binding in Windows Forms by Using the BindingSource Component
Understanding the BindingSource
Creating BindingSource Components
Configuring BindingSource Components
Using BindingSource Methods
Responding to BindingSource Events
Summary
Chapter 13 Using ADO.NET in Windows Forms
Using the BindingNavigator to Navigate Through Data
Displaying Data in Windows Controls
Formatting Data
Finding Data
Validating Data in Windows Forms
Using the ErrorProvider Component
Summary
Chapter 14 Basic Data Binding in Web Forms
Understanding Data Binding in Web Forms
Simple-Binding Web Controls to an ADO.NET Data Source
Complex-Binding Web Controls
Maintaining ADO.NET Object State
Implementing Navigation
Updating an Underlying Data Source
Summary
Chapter 15 Data Binding in Web Forms by Using the Data Source Component
Understanding the Data Source Component
Creating Data Source Components
Configuring Data Source Controls
Using Data Source Methods
Responding to Data Source Events
Summary
Chapter 16 Data-Bound and Validation Controls
Understanding Data-Bound Controls
Understanding List Controls
Understanding Template-Based Controls
Understanding DataControlFields
Understanding Validation Controls
Summary
ADO.NET and Other Types of Data
Chapter 17 Reading and Writing XML
Understanding XML Schemas
Understanding ADO.NET and XML
Using the DataSet XML Methods
Controlling How XML Is Written
Summary
Chapter 18 The XmlDataDocument
Understanding the XmlDataDocument
Creating XmlDataDocuments
Navigating an XML Document
Using XmlDataDocument Methods
Summary
Chapter 19 Using ADO and ADOX in the .NET Framework
Rebecca M. Riordan has worked as a consultant, a systems analyst, and a senior technical support engineer for Microsoft Australia. She studied database design and analysis at the University of California, Irvine. Rebecca has been a presenter at the TechEd conference and has written several other books, including Microsoft ADO.NET Step by Step and Microsoft SQL Server 2000 Programming Step by Step (Microsoft Press).