Amazon.com Review
For anyone who programs with databases in the new .NET in C#,
ADO.NET Examples and Best Practices for C# Programmers shows you what works and what doesn't when it comes to Microsoft's latest APIs for working with databases. Filled with practical advice and recommended "best practices," this concise and useful book offers some valuable advice for anyone working with ADO.NET.
While many C# titles cover Microsoft's .NET Framework in its entirety, the focus on the APIs and programming strategies for databases makes this one a standout. This edition of the book is actually a rewrite of William Vaughn's older title, ADO Examples and Best Practices, but it adopts the same focus in showing how to do the job right when it comes to databases. The authors are clear about relating what's new and improved with ADO.NET compared to the earlier COM-based standard (referred to here as "ADOc"). Early sections delve into connecting to ADO.NET data sources (using SQL Server and ODBC).
The focus on "best practices" for fast, correct code begins with a full tour of using Command objects in ADO.NET, with hints for getting to parameters in SQL code (including stored procedures). A winning feature here is the information on Visual Studio .NET wizards for programming with database objects. (The wizard support is surprisingly powerful, and the authors show you how to start with wizard-generated code and then customize it yourself.)
The fastest way to get to data in ADO.NET is arguably using a DataReader class. Coverage here is followed by a richer tour of the options using DataTable and DataSet, which allow you to define new table structures, including relational data and disconnected data sets. Good features in this text are the authors' benchmarks for determining how to dig into ADO.NET collections to quickly find individual column data within a record. (Certain coding conventions here can really ruin performance, and you'll learn what to avoid.)
The book rounds out with a tour of XML support available in ADO.NET, including how to pass data in and out of databases through XML. A useful example that shows a Web service exposing a bit of ADO.NET database code will let you extend your ADO.NET programs across servers. A brief introduction to the relevant standards in Web services like SOAP will help you understand what goes into Web services.
Databases are a part of most every business application, so .NET developers will need to master new APIs and programming strategies in a hurry. This title fits the bill, with a handy and fast-moving tutorial that will get you going confidently with .NET and databases. --Richard Dragan
Topics covered: COM-based ActiveX Data Objects (ADOc) and ADO.NET compared; overview of ADO.NET classes and features (including XML support, data providers, disconnected data sets); connecting to data with SQL, ODBC, and ADOc data providers; using ADO.NET command objects in detail (including stored procedures and IDE support); using the ADO.NET DataReader object for fast, read-only queries; using the DataTable and DataSet objects (including building tables on the fly); filtering, sorting, and searching techniques with ADO.NET (including the DataView object); updating data with ADO.NET (adding, editing and deleting rows, validation, update strategies, using identity fields); using .NET constraints (including unique and foreign key constraints; DataRelation objects); structured exception handling with ADO.NET; XML support in ADO.NET (including DataSet XML features, DiffGrams, XML Schema); a Web service example with XML and a data set; SOAP explained; benchmark data for best practices with ADO.NET; using the DataAdapter Configuration Wizard (DACW) and other Visual Studio .NET wizards.
About the Author
Peter D. Blackburn is chief executive officer of Boost Data Ltd., and chief technology officer of International Network Technologies Organization Ltd. Peter studied computer science at Cambridge University in England and has worked for the last 12 years as lead consultant developer on corporate and local government distributed database systems. He has led and trained teams working with nearly all the Microsoft data access technologies, in addition to having designed and implemented heavy-duty custom-built distributed client/server databases using open source D-ISAM on UNIX platforms.
William (Bill) Vaughn is an industry-recognized author, mentor and subject-matter expert. He's been in the computer industry for over 30 yearshe's worked with mainframe, minicomputer, and personal computer systems as a developer, manager, trainer, marketer, support person, and writer. After 14 years at Microsoft, Bill stepped away to work on his books and training seminars. His area of specialization is focused on data access and especially Visual Basic and SQL Server. He's written six editions of
The Hitchhiker's Guide to Visual Basic and SQL Server (Microsoft Press) and two editions of
ADO.NET and ADO Examples and Best Practices for Visual Basic Programmers (Apress). There's even a C# version:
ADO.NET Examples and Best Practices for C# Programmers (Apress). Bill is a top-rated speaker and frequents conferences all over the world, including VSLive, Developer Connections, and PASS (Professional Association for SQL Server). He's also written a wealth of articles for magazines such as
SQL Server Magazine,
Visual Basic Programmer's Journal,
.NET Magazine, and many others. Bill is working on content focusing on the .NET Compact Framework and SQL Server CE, as well as the next version of SQL Server. He's available for consulting or custom training.