Íàøëè îïå÷àòêó? Âûäåëèòå åå ìûøêîé è íàæìèòå Ctrl+Enter
Íàçâàíèå: Professional ADO NET 2: Programming with SQL Server 2005, Oracle, and MySQL
Àâòîð: McClure W.B.
Àííîòàöèÿ:
ADO.NET revolutionized the way data was accessed through SQL Server, Oracle, and MySQL. With Microsoft's release of ADO.NET 2, ADO and the .NET Framework are integrated with SQL Server for the first time-enabling you to program .NET applications directly within the SQL Server database.
Packed with sample code and recommended best practices for using ADO.NET 2, this code-intensive book explores the new data types that are available in the 2.0 Framework and discusses the appropriate time and way to use them. You'll learn how to make repetitive, mundane tasks much simpler and you'll walk away with a solid foundation for developing database-driven applications.
What you will learn from this book
The basics of creating a connection, executing a query, and returning a result
Best uses for Oracle in the ADO.NET Framework
The many new features that are available for XML
How to use the full text search capabilities of Microsoft(r) SQL Server 2005
Methods for retrieving data and presenting it in various ways
Why MySQL is a viable option for data storage
Who this book is for
This book is for experienced database developers who want to learn the latest release of ADO.NET 2.0. Knowledge of ADO.NET 1.0, general .NET development, and Microsoft SQL Server is necessary.
Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.
Configuration files, XML/ADO.NET integration120 Configuration Wizard, ObjectDataSource control182—184 Configuration Wizard, SQLDataSource control configuration170—174 Configuration Wizard, TableAdapter method connection187—189 Configuration() object, SQL Server Management Objects (SMOs)332 ConfigurationManager class, retrieving connection strings54 Connection object, establishing/maintaining connections11 Connection objects, constructors204 Connection objects, MARS (Multiple Active Result Sets)276—278 Connection pooling, SQL Server279—280 Connection property, data providers213 Connection strings, configuration file storage54 Connection strings, ConnectionStringBuilder class53—60 Connection strings, ConnectionStringCollection class54 Connection strings, creation methods53—54 Connection strings, database306 Connection strings, dynamic construction57 Connection strings, provider-specific string parameters57—60 Connection strings, provider-specific types55—57 Connection strings, retrieving54 Connection strings, SqlDataSource method431—432 Connection strings, TableAdapter method187 Connections, context327—328 Connections, database opening/closing60—62 Connections, exception error information collection62—66 Connections, exception management methods62—66 Connections, failover notification526 Connections, Oracle523—526 Connections, provider-specific issues66—67 Connections, status checking60—62 Connectionstring properties, data providers204—205 ConnectionStringBuilder class, building connection strings53—60 ConnectionStringCollection class, connection strings54 ConnectionTimeout property, data providers205 Constants, ADO.NET listing549—584 Constraints, MySQL473—474 Constraints, PostgreSQL498 Constructors, AdsDataAdapter class229—230 Constructors, connection object204 Consumers, data access6—12 Consumers, OLE-DB workflow process5—6 Contacts, SOAP447—448 Contacts, URL439—446 CONTAINS function, Full-Text Search412—413 CONTAINSTABLE function, Full-Text Search415 Context connections, CLR (Common Language Runtime) Objects327—328 Contracts, Service Broker370377—378 Controls, BindingList198 Controls, BindingNavigator198 Controls, Bindingsource197—198 Controls, Data Source164—169 Controls, multi-version concurrency499 Controls, ObjectDataSource176—185 Controls, SQLDataSource170—175 Controls, UI197—198 Conversions, XML/ADO.NET integration123—124 Coordination, Service Broker element370 CREATE AGGREGATE command, CLR mapping method307 CREATE ASSEMBLY statement, assembly deployment307 CREATE ENDPOINT command, SQL Server344—345 CREATE FUNCTION command, CLR mapping method307 CREATE PROCEDURE command, CLR mapping method307 CREATE TRIGGER command, CLR mapping method307 CREATE TYPE command, CLR mapping method307 Create() method, SMO Index() object336 CreateCommand() objects, Generic Factory Model77 CreateDbCommand() method, data providers208—209 CreateDbParameter() method, data providers215 CreateParameter() method, adding parameters to an object79—80 CreatePermission() method, data providers232 CTEs (Common Table Expressions), T-SQL252—254 Currency, data types102 CURSOR data type, SQL Server108 Cursors, server-side480 Customer sign-up, Service Broker service383—386 CustomerInfoSchema, Service Broker376 DAO (Data Access Objects), development history6—7 Data access layer, consumers6—12 Data access layer, development history2—4 Data access layer, industry support2 Data access layer, performance factor1 Data access layer, reliability1 Data access layer, vendor commitment2 Data Access Objects (DAO), development history6—7 Data binding, ASP.NET 1.x163—164 Data binding, ASP.NET 2.0163—164 Data binding, data source caching167—169 Data binding, Data Source controls164—169 data binding, data sources160—162 Data binding, DataSource control generation189—190 Data binding, DBDirect methods186—187 Data binding, defined159 Data binding, ObjectDataSource control176—185 Data binding, one-way versus two-way163 Data binding, parameter data validation166 Data binding, parameter passing165—167 Data binding, provider-specific syntax issues175—176 data binding, SqlDataSource control170—175 Data binding, TableAdapter method185—189 data binding, typed datasets185—186 data binding, Windows Forms191—198 Data binding, Windows Forms versus Web applications159—160 Data concurrency, two-way data binding issues163 Data Definition Language (DDL), event triggers313—314 Data Definition Language (DDL), Full-Text Search index setup407—408 Data exchange, XML/ADO.NET integration119 Data migration, select statement29 Data providerssee also "Providers" Data providers, Active Directory shortcomings201 Data providers, ADO.NET registration233 Data providers, AdsCommand class211—219 Data providers, AdsConnection class203—209 Data providers, AdsConnectionStringBuilder class209—211 Data providers, AdsDataAdapter class228—231 Data providers, AdsDataReader class219—228 Data providers, AdsFactory class231—232 Data providers, AdsParaineterCollection class212 Data providers, AdsProvider class202 Data providers, classes202 Data providers, connection object constructors204 Data providers, connection string fields203—204 Data providers, DataSourceEnumerator class232 Data providers, deleting records217—218 Data providers, DirectorySearcher class212 Data providers, indexers219—221 Data providers, Oracle515—516 Data providers, parameter non-support reasons212 Data providers, permissions232 Data providers, reader (select) methods216 Data providers, tables212 Data providers, updating records217—218 Data providers, user objects212 Data providers, user properties versus Active Directory properties221—226 Data Source caching, when to use168—169 Data Source Configuration Wizard, data sources193—196 Data Source controls, ASP.NET 2.0 data binding164 Data Source controls, data caching167—169 Data Source controls, generating189—190 Data Source controls, parameter passing165—167 Data Source controls, Visual Studio2005169—170 Data Source window, interface elements192—196 Data sources, data binding160—162 Data sources, data retrieval81 Data sources, Data Source Configuration Wizard193—196 Data sources, distributed transactions145—154 Data sources, listing available51—53 Data sources, Reporting Services436—437 Data sources, schema metadata system information69—73 Data sources, Windows Forms192—196 Data storage, legal issues35
Data stores, BerkeleyDB503 Data Transformation Services (DTS), data migration29 Data types, ADO.NET109—116 Data types, BFile543 data types, BIGINT100 data types, BINARY102—106 data types, BIT107 data types, boolean97 Data types, CHAR (character)98 Data types, CLR (Common Language Runtime) Objects324—326 Data types, CURSOR108 Data types, DATETIME (TIMESTAMP)100 Data types, decimal (DEC and DEC (p,s))101—102 Data types, FLOAT (FLOAT and DOUBLE PRECISION)101 data types, floating-point101 data types, IMAGE102—103 Data types, INT (integer)9799 Data types, legacy support issues40—41 data types, MONEY102 Data types, NCHAR (national character storage)99 Data types, NTEXT99 data types, nullable types113—114 data types, numeric101 Data types, NVARCHAR (MAX)99 Data types, nvarchar (national character storage)99 Data types, Oracle523 Data types, PostgreSQL498 Data types, REAL (FLOAT(24))101 Data types, schema metadata system69 Data types, Service Broker queue tables394—395 data types, SMALLDATETIME100 data types, SMALLINT100 data types, SMALLMONEY102 data types, SQL Server98—108 Data types, SqlTypes namespace109—113 Data types, SQL_VARIANT107—108 data types, string97 Data types, table108 data types, Text99 Data types, TIMESTAMP107 data types, TINYINT100 Data types, UNIQUEIDENTIFIER108 data types, VARBINARY102—103 Data types, VARBINARY (MAX)102—103 Data types, VARCHAR (char varying/character varying)98 Data types, VARCHAR (MAX)99 Data types, XML108 Data types.NET Framework109—116 DataAdapter object, data retrieval11 DataAdapter() object, DataSet population method89—90 Database connection strings, SQLServer projects306 Database integration, Service Broker element370 Database property, data providers205206 Database() object, SQL Server Management Objects (SMOs)332334—335 databasessee also "Open-source databases" Databases, CODASYL definition2 Databases, context connections327—328 Databases, creating in SQL Server Management Objects (SMOs)332—334 Databases, data deletion protection methods35 Databases, data normalization24—30 Databases, DbConnection class relational3—4 Databases, design guidelines30—35 Databases, flat28—29 databases, indexes22 Databases, normalized design26 Databases, old/new design migration34—35 Databases, opening/closing connections60—62 Databases, planning process13—14 Databases, quality data assurance26—27 Databases, reports23—24 Databases, security enforcement23 Databases, Service Broker setup372—373 Databases, SMO backup/restore338—341 Databases, strongly typed business objects33—34 databases, views22—24 Databases, XML Web services343—345 DataReaders() object, DataSet population method90 DataReaders() object, forward-only read capability11 DataReaders() object, value returns88 DataReaders() object, when to use95 DataSet() object, disconnected data storage11 DataSets, binary serialization92—93 DataSets, data filling82 DataSets, data representation88 DataSets, DataAdapter() object89—90 DataSets, DataReaders() object90 DataSets, in-memory database representations32 DataSets, manual population methods89 DataSets, serialization92—93 DataSets, when to use95—96 DataSource property, data providers205 DataSourceEnumerator class, data providers232 DataSourceProductName class, schema metadata system70 DataTableReader() class, data representation93 DataTables, data filling82 DataTables, data representation90 DataTables, DataTableReader() class93 DataTables, DataView() object91—92 DataTables, Oracle fills529—531 DataTables, RowState() object91 DataTables, serialization92—93 DataTables, streaming data93—94 DataView() object, DataTables91—92 Date/time, data types100 DATETIME (timestamp) data type, SQL Server100 DateTime fields, naming conventions16 DbCommand object, calling from a DbConnection object78 DbCommand object, calling from Generic Factory Model77 DbCommand object, provider independent class44—45 DbConnection class, DbCommand object calls78 DbConnection class, metadata retrieval202 DbConnection class, provider-independent class44—45 Dbconnection property, data providers213 DbDatasourceEnumerator() method, listing available data sources52—53 DbDirect methods, data binding186—187 DbParameter, provider independent class44—45 DbTransaction property, data providers214—215 DDL (Data Definition Language), event triggers313—314 DDL (Data Definition Language), Full-Text Search index setup407—408 DDL CREATE ENDPOINT command, SQL Server344—345 DDL triggers, T-SQL263—264 Debugging, CLR (Common Language Runtime) Objects309—310 Debugging, XSL125—126 DECIMAL (DEC and DEC(p, s)) data type, SQL Server101—102 Delete() method, removing subscribers359 Delivery channels, distributor component350 Delivery channels, instance configuration file352 Delivery protocols, distributor component350 Dense_Rank() function, T-SQL248 Depth property, data providers226 Device list, subscription management application360—363 Deviceinfo object, ReportServer453—460 devicelist.aspx file, subscription management application360 Dialogs, Service Broker component370 Direct execution, SQL Server Management Objects (SMOs)330 DirectorySearcher class, data providers212 Disconnected data access, ADO support9 Dispose() method, data providers208228 Distributed data, Ingres493 Distributed Transaction Coordinator, performance monitoring149—150 Distributed transactions versus local transactions141 Distributed transactions, client-side145—146 Distributed transactions, flow-through156 Distributed transactions, IDBDataAdapter object150—153 Distributed transactions, local data effects150—153 Distributed transactions, multiple data source spanning145 Distributed transactions, nested transactions153—155 Distributed transactions, performance monitoring149—150 Distributed transactions, System.Transactions namespace146—149 Distributed transactions, TransactionScope object146—149