Ado.Net Cookbook

  • ポイントキャンペーン

Ado.Net Cookbook

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版
  • 言語 ENG
  • 商品コード 9780596004392
  • DDC分類 005.74

Table of Contents

Preface                                            ix
Connecting to Data 1 (50)
Connecting to an ODBC Data Source 4 (2)
Connecting to a Microsoft Excel Workbook 6 (3)
Connecting to a Password-Protected Access 9 (2)
Database
Connecting to a Secured Access Database 11 (2)
Connecting to an Access Database from 13 (1)
ASP.NET
Using an IP Address to Connect to SQL 14 (3)
Server
Connecting to a Named Instance of SQL 17 (2)
Server or Microsoft Data Engine (MSDE)
Connecting to SQL Server Using Integrated 19 (1)
Security from ASP.NET
Connecting to an Oracle Database 20 (4)
Connecting to Exchange or Outlook 24 (2)
Writing Database-Independent Code 26 (2)
Storing Connection Strings 28 (5)
Using the Data Link Properties Dialog Box 33 (1)
Monitoring Connections 34 (3)
Taking Advantage of Connection Pooling 37 (3)
Setting Connection Pooling Options 40 (5)
Using Transactions with Pooled Connections 45 (1)
Changing the Database for an Open 45 (2)
Connection
Connecting to a Text File 47 (4)
Retrieving and Managing Data 51 (71)
Retrieving Hierarchical Data into a 53 (3)
DataSet
Building a DataSet Programmatically 56 (3)
Creating a Strongly Typed DataSet 59 (4)
Processing a Batch SQL Statement 63 (4)
Using a Web Service as a Data Source 67 (3)
Accessing Deleted Rows in a DataTable 70 (4)
Counting Records in a DataReader 74 (2)
Mapping .NET Data Provider Data Types to 76 (6)
.NET Framework Data Types
Returning an Output Parameter Using a 82 (2)
DataReader
Raising and Handling Stored Procedure 84 (3)
Errors
Testing for No Records 87 (2)
Retrieving Stored Procedure Return Values 89 (3)
Using a DataReader
Executing SQL Server User-Defined Scalar 92 (1)
Functions
Passing Null Values to Parameters 93 (3)
Retrieving Update Errors 96 (4)
Mapping Table and Column Names Between 100(2)
the Data Source and DataSet
Displaying Columns from a Related 102(2)
DataTable
Controlling the Names Used in a Strongly 104(4)
Typed DataSet
Replacing Null Values in a Strongly Typed 108(3)
DataSet
Retrieving Data from an Oracle Package 111(4)
Using Parameterized SQL Statements 115(2)
Querying Data Asynchronously with Message 117(5)
Queuing
Searching and Analyzing Data 122(37)
Filtering and Sorting Data 123(3)
Using Expression Columns to Display 126(3)
Calculated Values
Determining the Differences in Data 129(5)
Between Two DataSet Objects
Navigating Between Parent and Child 134(2)
Records Using a DataRelation
Localizing Client-Side Data in a Web 136(3)
Forms Application
Combining Data in Tables from 139(1)
Heterogeneous Data Sources
Using Expression Columns to Display 140(2)
Aggregate Values
Finding Rows in a DataTable 142(3)
Finding Rows in a DataView 145(3)
Selecting the Top n Rows in a DataTable 148(3)
Getting Typed DataRows from DataViews 151(2)
Filtering for Null Values 153(1)
Executing Queries That Use Compute By 154(2)
Using the Shape Language to Retrieve 156(3)
Hierarchical Data
Adding and Modifying Data 159(65)
Using Auto-Incrementing Columns Without 160(3)
Causing Conflicts
Getting an Identity Column Value from SQL 163(5)
Server
Getting an AutoNumber Value from 168(3)
Microsoft Access
Getting a Sequence Value from Oracle 171(4)
Adding Parent/Child Rows with 175(2)
Auto-Incrementing Keys
Adding Records with a GUID Primary Key 177(3)
Updating a Data Source with Data from a 180(3)
Different Data Source
Updating a Primary Key Value 183(3)
Getting Stored Procedure Parameter 186(3)
Information at Runtime
Updating a DataSet with a Many-to-Many 189(15)
Relationship
Updating Server Data Using a Web Service 204(5)
Updating Server Data Using .NET Remoting 209(7)
Updating Data Asynchronously Using 216(4)
Message Queuing
Overcoming Keyword Conflicts When Using 220(4)
CommandBuilders
Copying and Transferring Data 224(56)
Copying Rows from One DataTable to Another 225(2)
Copying Tables from One DataSet to Another 227(4)
Converting a DataReader to a DataSet 231(4)
Serializing Data 235(4)
Deserializing Data 239(2)
Merging Data 241(4)
Transmitting a DataSet Securely 245(10)
Transferring Login Credentials Securely 255(4)
Loading an ADO Recordset into a DataSet 259(1)
Converting a DataSet to an ADO Recordset 260(13)
Exporting the Results of a Query as a 273(2)
String
Exporting the Results of a Query to an 275(5)
Array
Maintaining Database Integrity 280(82)
Creating a Class That Participates in an 281(4)
Automatic Transaction
Using Manual Transactions 285(3)
Nesting Manual Transactions with the SQL 288(3)
Server .NET Data Provider
Using ADO.NET and SQL Server DBMS 291(4)
Transactions Together
Using a Transaction with a DataAdapter 295(3)
Avoiding Referential Integrity Problems 298(17)
When Updating the Data Source
Enforcing Business Rules with Column 315(7)
Expressions
Creating Constraints, PrimaryKeys, 322(4)
Relationships Based on Multiple Columns
Retrieving Constraints from a SQL Server 326(6)
Database
Checking for Concurrency Violations 332(5)
Resolving Data Conflicts 337(6)
Using Transaction Isolation Levels to 343(4)
Protect Data
Implementing Pessimistic Concurrency 347(11)
Without Using Database Locks
Specifying Locking Hints in a SQL Server 358(4)
Database
Binding Data to .NET User Interfaces 362(72)
Binding Simple Data to Web Forms Controls 363(2)
Binding Complex Data to Web Forms Controls 365(2)
Binding Data to a Web Forms DataList 367(7)
Binding Data to a Web Forms DataGrid 374(4)
Editing and Updating Data in a Web Forms 378(8)
DataGrid
Synchronizing Master-Detail Web Forms 386(4)
DataGrids
Displaying an Image from a Database in a 390(3)
Web Forms Control
Displaying an Image from a Database in a 393(3)
Windows Forms Control
Binding a Group of Radio Buttons in a 396(5)
Windows Form
Creating Custom Columns in a Windows 401(3)
Forms DataGrid
Populating a Windows Forms ComboBox 404(5)
Binding a Windows DataGrid to 409(11)
Master-Detail Data
Loading a Windows PictureBox with Images 420(4)
Stored by Access as OLE Objects
Using a DataView to Control Edits, 424(2)
Deletions, or Additions in Windows Forms
Adding Search Capabilities to Windows 426(3)
Forms
Dynamically Creating Crystal Reports 429(2)
Using ADO.NET Design-Time Features in 431(3)
Classes Without a GUI
Working with XML 434(53)
Using XSD Schema Files to Load and Save a 435(6)
DataSet Structure
Saving and Loading a DataSet from XML 441(9)
Synchronizing a DataSet with an XML 450(7)
Document
Storing XML to a Database Field 457(3)
Reading XML Data Directly from SQL Server 460(2)
Using XPath to Query Data in a DataSet 462(3)
Transforming a DataSet Using XSLT 465(3)
Creating an XML File That Shows Changes 468(4)
Made to a DataSet
Formatting Column Values When Outputting 472(3)
Data as XML
Filling a DataSet Using an XML Template 475(6)
Query
Using a Single Stored Procedure to Update 481(6)
Multiple Changes to a SQL Server Database
Optimizing .NET Data Access 487(57)
Filling a DataSet Asynchronously 489(3)
Canceling an Asynchronous Query 492(4)
Caching Data 496(4)
Improving Paging Performance 500(6)
Performing a Bulk Insert with SQL Server 506(3)
Improving DataReader Performance with 509(4)
Typed Accessors
Improving DataReader Performance with 513(3)
Column Ordinals
Debugging a SQL Server Stored Procedure 516(2)
Improving Performance While Filling a 518(4)
DataSet
Retrieving a Single Value from a Query 522(2)
Reading and Writing Binary Data with SQL 524(7)
Server
Reading and Writing Binary Data with 531(4)
Oracle
Performing Batch Updates with a 535(5)
DataAdapter
Refreshing a DataSet Automatically Using 540(4)
Extended Properties
Enumerating and Maintaining Database Objects 544(41)
Listing SQL Servers 545(2)
Retrieving Database Schema Information 547(4)
from SQL Server
Retrieving Column Default Values from SQL 551(2)
Server
Determining the Length of Columns in a 553(3)
SQL Server Table
Counting Records 556(1)
Creating a New Access Database 557(2)
Creating a New SQL Server Database 559(2)
Adding Tables to a Database 561(2)
Getting a SQL Server Query Plan 563(2)
Compacting an Access Database 565(2)
Creating DataSet Relationships from SQL 567(6)
Server Relationships
Getting SQL Server Column Metadata 573(1)
Without Returning Data
Listing Installed OLE DB Providers 574(2)
Listing Tables in an Access Database 576(3)
Creating a Table in the Database from a 579(4)
DataTable Schema
Listing Installed ODBC Drivers 583(2)
Appendix: Converting from C# to VB Syntax 585(8)
Index 593