DAO (Data Access Objects), 4–5
Data Access Component (DAC), 641, 648–652, 770–775
Data Adapter Configuration Wizard, 41–51
DataAdapter, adding, 42–44
DataAdapter properties, setting and reviewing, 44–46
DataGrid control, adding, 42
DataGrid control, filling with data, 50–51
project template, 42
reviewing options, 46–48
source code, 48–49
data binding
ASP.NET server controls and. See ASP.NET server controls and data binding
in ComboBox and ListBox controls, 304–306
in complex Web Forms controls, 562–607
BaseDataList class, 562–563
DataGrid Web server control. See DataGrid Web server control
DataKeyCollection class, 563
DataList Web server control. See DataList Web server control
Control and Page classes in, 539
mapped objects and, 675–684
bound objects, accessing properties of, 678–680
bound objects, using logic with, 680–685
connection strings, 676
read-only, 537
Repeater control and, 553
simple and complex, 538
in simple Web Forms controls, 540–562
ASP.NET templates, 547–548
Button control, 540–541
Calendar control, 542–545
DropDownList control, 558–560
ListBox control, 556–558
ListControl class, 555–556
Repeater control, 552–555
templates, Web server control. See templates, Web server control templates
TextBox, Button and Image controls, 560–562
in Web Forms, 537–539
data binding and data-bound controls, 287–344
code listings
AllowNavigation in Action, 319
Binding Multiple Controls Using Binding, 289
Binding TextBox Using Binding, 288–289
Counting and Removing Binding objects, 290
CreateDataSet Method, 322–323
Custom Recordset, Creating, 337
CustRecordSet.vb, 335–336
DataGridBoolColumn Class, Creating, 318
DataGrid's Caption Properties, 321
DataGrid's Color and Font Properties, Using, 320
DataGridTableStyle, Creating and Adding, 315
DataGridTableStyle From CurrencyManager, 316
Exchanging the Button Click Handler, 329
FillDataGrid and Form_Load Methods, 328
FillDataGrid Method, 323–324, 341
FillDataSet Method, 305
Form Load Event Handler, 304
Format and Parse Event Handlers, Adding, 292
Form's Load Method, 321
Getting a DataGrid Column Header Name, 332
Getting a DataGrid Columns' Style Using DataGridColumnStyle, 330–331
Getting Current DataGridColumnStyle, 333–334
HitTest in Action, 325–326
ListBox and ComboBox Controls, Binding, 305–306
ListBox Control Event Handler, Adding, 302–303
LoadData and GetDataSet Methods, 298–299
Move Next, Move Previous, Move First, Move Last Button Code, 299
Moving Record Button Click Event Handlers, 337–338
Raising ListBox Events, 303
Reading all Bindings of a Form, 290–291
Reading All Controls Participating in Data Binding, 294
Reading TextBox Control's Binding Properties, 291–292
Record Navigation System Variables, 298
ReshuffleColumns Method, 329–330
Saving Updates Data in a Data Source From a DataGrid Control, 343–344
Search Button Click Event Handler, 341–342
Setting DataSource and DataMember Properties of a DataGrid Control, 307
Sorting a DataGrid Control's Columns, 334
complex data-bound controls, 301–307
ComboBox and ListBox controls, data binding in, 304–306
Control class in data binding, 301
DataGrid control, data binding in, 306–307
deleting data binding, 307
ListControl class, 301–302
ListControl DataBinding-related events, 302–303
DataGrid control. See DataGrid control
fundamentals of data binding, 287–301
Binding class, 288–292
BindingContext, 296
BindingManagerBase functionality, 293–296
record navigation system, building, 296–300
Data Binding in a DataGrid Control (code listing), 583–584
data binding in ASP.NET, 487–507
adding data, 505
data-bound server-side controls, 488–489
DataGrid and DataList controls. See DataGrid and DataList controls in ASP.NET
deleting data, 507
updating data, 506
Web Forms, adding, editing, and deleting in, 502–504
data-bound connectivity, 193
data-bound controls. See also data binding and data-bound controls
ASP.NET, 488–489
basics, 38
Data Column, Setting as Primary Key (code listing), 90
data components, Visual Studio .NET. See Visual Studio .NET data components
data connections, understanding, 38–40
data consumers (OLE DB), 5–6
Data Form Wizard
adding items, 58
calling form from application, 65–66
code listings, 68–71
creating relationship between tables, 60–61
Data Connection, choosing, 59
DataForm1.vb, 67–71
DataSet, choosing, 59
display style, choosing, 62–65
displaying tables and columns, 62
MyDS.xsd, 67
project template, 58
tables or views, choosing, 59–60
viewing output, 66
Data Link Properties Wizard, 35, 40
data object (mapped objects), 641, 643–644
data providers. See also Oracle .NET data provider; SQLXML and SQL XML .NET
base data providers, 37
choosing, 80
choosing .NET, 22–23
definition and fundamentals, 15–16
generic model, 135–136
MySQL database and .NET data provider, 435
ODBC data provider, 414
ODBC .NET. See ODBC .NET data provider
ODP.NET data provider, 414
OleDb data provider, 5–6, 414
OraDirect.NET, 413
selecting, 769–770
Web-service-based, 437
data providers, developing custom, 437–464
advantages of, 437–438
building, 446–463
PipedDataAdapter object, 460–462
PipedDataCommand object, 449–453
PipedDataConnection object, 446–449
PipedDataProvider application, testing, 462–463
PipedDataReader object, 453–459
code listings
Implementation for an Enumerator, 442
PipedDataAdapter Object, 460–462
PipedDataCommand Object, 450–453
PipedDataConnection Object, 447–449
PipedDataProvider Test Case, 463
PipedDataReader Object, 454–459
debugging, 464
interfaces, overview of, 438–445
Adapter objects, 443–445
Command objects, 440–441
Connection objects, 439–440
grouped by function, 438
Reader objects, 441–443
data relations, 353–358
code listings
Creating a DataRelation, 355
Deleting a Data Relation from the Collection, 358
Filling a DataSet from Two Tables, 354
Getting DataRelation Properties, 356–357
DataRelation and DataRelationCollection objects, 354–358
fundamentals, 353–354
data sources
connecting to, 139–150
connection pooling, 145–149
connection properties and methods, 140–141
CreateCommand and ChangeDatabase methods, 149–150
creating connections, 139–140
opening and closing connections, 142–145
updating, 776
data synchronization, 293–294
DataAdapter objects. See also PipedDataAdapter object
constructing, 166–168
DataAdapter Connection through TableMapping (code listing), 49
DataAdapter events, 215–220
DataAdapter example, 172–175
DataAdapter FillError Event Handler Code (code listing), 217
DataAdapter's Fill and Update Methods, Calling (code listing), 219–220
DataAdapter's Update Method, Calling (code listing), 178
DataTable, adding to DataSet, 172
Filling DataAdapter from RecordSet, 175–176
Filling DataSets, 170–171
fundamentals, 19–20
methods, 170
paging with, 815–816
properties, 168–169
reading and writing data using, 423–424
relationship to DataSet and DataView objects, 121
SQL DataAdapters, 40–51
table and column mapping, 178–181
updating database using Update method, 176–178
Database Table Schema, Getting Using SqlCommand (code listing), 811–812
databases
database owners, 395
database Web applications using ASP.NET. See ASP.NET for database Web applications
Database's Tables, Getting from SQL Server Database (code listing), 825–826
defined, 779
design slippage, dangers of, 768–769
pages, checking size of, 767–768
schemas
getting programmatically using DataSet, 824–827
obtaining programmatically, 811
Video Store Application design, 641–643
DataBind method, 539
DataBinder.Eval, 678
DataColumns
adding to DataTables, 90–92
class properties, 86
creating, 86–89
Creating and Setting Properties (code listing), 89–90
DataColumnCollection class, 116–117
DataColumnCollection object, 115
DataColumnMapping, Using (code listing), 180–181
properties, 85–86, 92–94
setting properties, 89–90
DataForm1.vb, 67–71
DataGrid and DataList controls in ASP.NET, 490–502
AutoFormat, 492–493
Borders property page, 497–498
Columns property page, 494–495
DataGrid control properties, 490–492
Filling a DataSet, 498–499
Format property page, 496–497
Paging in DataGrid control, 499–500
Paging programmatically, enabling, 500–502
Paging property page, 496
Property Builder, 493–494
DataGrid control, 307–344
avoiding plus (+) sign in, 813
basics, 307–308
building DataGrid record navigation system, 335–338
Button Columns, using with, 591–594
class properties and methods, 309–312
columns
hiding, 332–334
reshuffling, 326–331
creating editable, 598–604
custom sorting in, 334
data binding in, 306–307
DataGrid and DataGrid Column styles
DataGrid Columns' Style, Getting Using DataGridColumnStyle (code listing), 330–331
DataGrid Control's Columns, Sorting (code listing), 334
DataGridColumnStyle, Getting Current (code listing), 333–334
DataGridTableStyle and DataGridColumnStyle, 321–324
DataGridTableStyle and DataGridColumnStyle in action, 321–324
DataGrid Column Header Name, Getting (code listing), 332 and DataGrid Column styles, 313–321
basics, 313
caption properties, setting, 320–321
coloring and font styles, 320
DataGridBoolColumn class, 317–318
DataGridBoolColumn Class, Creating (code listing), 318
DataGridColumnStyle class, 316–317
DataGrid's Caption Properties (code listing), 321
DataGrid's Color and Font Properties, Using (code listing), 320
DataGridStyle, constructing and adding, 315–316
DataGridTableStyle class, 314
DataGridTableStyle, Creating and Adding (code listing), 315
DataGridTableStyle from CurrencyManager (code listing), 316
GridColumnStyles property, 314
GridTableStyleCollection members, 314–315
sorting and Navigation, setting, 318–319
DataGrid control events, calling, 589–590
DataGrid Control's Next and Previous Page Text, Setting Image as (code listing), 501
DataGrid's PageStyle Modes, Setting (code listing), 501
helper objects, 312–313
HitTest method, 324–334
DataGrid.HitTestInfo class, 324–326
getting column header name, 332
hiding DataGrid columns, 332–334
reshuffling DataGrid columns, 326–331
inserting, updating, and deleting through DataGrids, 342–344
rows, determining number in, 815
searching a DataGrid, 338–342
supporting templates, 548
DataGrid Web server control, 582–607
Button Columns, using with, 591–594
calling DataGrid events, 589–590
columns
customizing and rearranging, 587–589
understanding, 586–587
creating programmatically, 582
DataGrid Control's Style Properties, Setting (code listing), 585–586
DataGrid with Button Columns (code listing), 593–594
DataGridColumn class, using, 587
DataGridCommandEventArgs class, 591
editable DataGrid, creating, 598–604
sorting and searching in, 605–607
styles, setting, 584–586
Template Columns, using with, 594–598
DataKeyCollection class (Web Forms), 563
DataList Web server control, 564–582
Data Binding in (code listing), 564–566
DataKeys, 571
DataList Control's Properties, Setting (code listing), 568–569
DataList Control's Styles, Settings (code listing), 570–571
DataList events, 571–573
editing, updating, and deleting through, 573–581
multiple columns, grid lines, and alternating rows, setting, 568–569
properties
setting, 566–567
setting with VS .NET IDE, 581–582
setting style and templates of, 569–571
supporting templates, 548
DataReader
basics, 160–161
Command Behaviors, 165–166
counting total records in, 844
vs. DataSet, 193
end of file, discovering, 844
Executing Batches Using (code listing), 164–165
initializing, 161
interpreting batches of queries, 164–165
introduction to, 75
Oracle-Specific DataReader Methods, Using (code listing), 423
properties and methods, 161–162
reading fast data using, 421–423
reading with, 162–164
Reads Data From SQL Server Database (code listing), 162–164
retrieving data with, 775–776
sorting records using, 845
DataRelations
DataRelation and DataRelationCollection objects, 354–358
DataRelation, Creating a (code listing), 355
DataRelation, Creating Customer/Order Relationship Using (code listing), 100
DataRelation Properties, Getting (code listing), 356–357
fundamentals, 99–100
DataRow class properties and methods, 94–95
DataRow states and versions, 117–119
DataRowCollection class, 115–116
DataRows
DataRowState enumeration, 98–99
DataRowState members, 843
DataRowView class, 118
fundamentals, 94–99
DataSet objects
AcceptChanges method, 127
basics, 121–122
vs. commands, 776
in connected environments, 188–194
accepting and rejecting changes through DataSet, 191–192
adding, updating, and deleting through DataSet, 190–191
vs. DataReader, 193
fetching data based on wildcard characters, 194
Filling DataSet from multiple tables, 188–189
saving only changed data, 192–193
SQL statement to read data from two or more tables, 190
copying, cloning, and clearing, 125
copying contents of, 822–823
creating, 122
DataSet format, displaying XML data in, 270
DataSet Rows, Adding, Editing, Deleting (code listing), 190–191
DataSetName property, 122
DataSetView properties, 132
DataTables, adding to, 172
DataTables, attaching to, 124–125
DataView components and, 51–57
typed DataSets in VS .NET, 51–54
understanding DataView, 54–57
in DataViews, 21–22
defined, 8, 120
events, 220–221
Filling, 170–171
Filling from multiple views, 411
fundamentals, 121–128
getting changed rows of, 125–126
getting column names and data types from, 814
merging DataRow, DataTable or DataSet, 126–127
vs. object-relational mapping, 638
properties, 122–124
to read data, 28–31
reading XML using, 262–264
ReadXml method, 127
ReadXmlSchema method, 127
vs. RecordSets, 12
RejectChanges method, 127
retrieving data with, 775–776
saving data to XML, 271–272
structure, 20–21
typed and untyped, 51–54, 127–128
WriteXml method, 127
WriteXmlSchema method, 127
writing XML using, 264–267
XmlDataDocument and, 272
DataSource and DataMember Properties of a DataGrid Control, Setting (code listing), 307
DataTables
adding DataColumns to, 90–92
adding DataSet to, 172
AddRowBtn_Click Method, 109–110
attaching to DataSet objects, 124–125
Class-Level DataTable and DataSet Variables, 107
class properties and methods, 101
columns, hiding, 814
CreateCustomersTable Method, 107–109
DataTable and DataView, searching using, 339–341
DataTable Objects, Adding to a DataSet (code listing), 124–125
DataTableCollection class, 124
DataTableMapping to Map Orders Table of Northwind (code listing), 179
DataTableMapping with Table Option, Using (code listing), 179–180
DataTable.Rows.Add method, 95
DeleteRowsBtn_ClickMethod, 110–112
events, 221–226
multiple constraints and, 349
Saving DataTable in XML Documents, 114
SearchButtonClick Method, 112–113
Sorting Data Using Select Method, 113–114
working with, 83–119
DataColumnCollection class, 116–117
DataColumns. See DataColumns DataRelations, 99–100
DataRow states and versions, 117–119
DataRowCollection class, 115–116
DataRows, 94–99
fundamentals, 83–85
properties and methods, 100–105
DataViews
class properties and methods, 128–129
in connected environments, 194–208
batches, executing, 206–208
concurrency, using, 201–204
multiple views, creating, 195–197
Rollback, Commit, and Savepoints, 204–206
transactions and concurrency, 198–200
transactions, using, 200–201
DataSets in, 21–22
DataView and DataViewManager events, 229–231
DataView Event Handler Caller (code listing), 230–231
DataView OnListChanged Event Handler (code listing), 230
DataViewManager, 132
fundamentals, 128–131
relationship to DataSets and DataAdapters, 121
understanding, 54–57
DBTools Manager, 381
dead letter queues (system), 726
deadlocks, 791
debugging custom data providers, 464
default Web Form (guest book), 508–511
DefaultViewManager property, 123
Delete methods
DataRow, 96
DataView, 130
DELETE statements, 534, 802–803
DeleteCommand event handler, 577
DeleteCommand Property of DataAdapter, Setting (code listing), 176
DeleteRowsBtn_ClickMethod (code listing), 110–112
deleting
data (ASP.NET), 507
data binding, 307
Deleting a Queue (code listing), 738
Deleting Data on Delete Button Click (code listing), 507
inserting, and updating through DataGrids, 342–344
updating, and editing through DataList control, 573–581
denormalization
defined, 786
of tables, 768
dependencies, managing (Video Store Application), 661–662
design tradeoffs, 665–673
component isolation, 666–667
component isolation workaround, 667–670
stored procedures, logic in, 665–666
VideoCheckInCheckOut test case, 670–673
designer vs. manual development mode, 775
detail table, loading when master is loaded, 703–704
determinant columns, 785
Determining State of a Row (code listing), 118
DiffGrams
Format (code listing), 840–841
fundamentals, 839–843
Reading (code listing), 841–842
Dimension Members, Getting (code listing), 723–724
dirty reads, 788
disconnected classes, 74, 81–83
disconnected data components, 51
disconnected environments, ADO.NET
in. See ADO.NET in disconnected
environments
discovery files (Service1.disco), 527
Discovery Service Protocol, 517
DisplayData.aspx
HTML View (code listing), 624–627
Online Job Board Application, 623–632
Displaying Customers Table's Data in DataGrid Using SqlDataAdapter (code listing), 174–175
displaying data, 25–26
Displaying Orders Table Data in DataGrid Using OleDbAdapter (code listing), 173–174
Dispose method (connections), 143, 148
DLL hell, 10
dnjHeader.aspx page (Online Job Board Application), 632–633
Document Outline viewer, 475–476
documents
adding nodes to, 256
closing XML, 245–246
XML classes, 234
DOM (Document Object Model)
implementation, 251–260
adding attributes to nodes, 259–260
saving documents, 253
XmlDocument class, 252–253
XmlDocumentFragment class, 253–254
XmlElement class, 254–259
XmlNode class, 252
interfaces, 237
Done Button Click Event Handler (code listing), 620, 623
drag-and-drop design-time feature, 485
driver manager, ODBC, 2–3
DROP TABLE statements, 803–804
DropDownList Control
Data Binding (code listing), 559–560
using, 558–560
Duwamish7 demo application, 639
dynamic cursors, 786–787