Developer

C# programmers will enjoy new book on .NET database access

Making the transition to ADO.NET is often a painful process. This book provides everything needed to take full advantage of the new platform with plenty of real-world examples using C#.


Much has been written about Microsoft developers’ painful transition to the .NET platform, but what about database access? Many books scratch the surface of ADO.NET, but the recently published ADO.NET Programming by Arlen Feldman, from Manning Publications, provides in-depth information on every aspect of the technology. One word of warning: The book takes the perspective of the C# programming language, so VB.NET and other non-C# developers will not find the book as useful as their C# colleagues.

ADO.NET Programming

By Arlen Feldman
Manning Publications Company
July 2002
592 pages
ISBN: 1930110294
Cover price: $44.95



Simple layout
ADO.NET Programming information is presented in a logical order, with the book divided into seven parts:
  1. ADO.NET overview
  2. ADO.NET basics
  3. The DataSet
  4. DataBound controls
  5. XML and ADO.NET
  6. Useful extras
  7. Appendices

The first section lays the groundwork for the rest of the book. You may be tempted to skip it if you are already familiar with ADO.NET, but there are many valuable tidbits for developers of all skill levels. I always find it beneficial to review writings on familiar concepts, because I can use the reinforcement, and I often uncover new details.

Make the connection
Section two contains 10 chapters that provide an introduction to the ADO.NET programming environment. This includes making the connection, issuing database commands, reading data, and working with stored procedures. The text discusses dealing with Microsoft SQL Server and non-Microsoft database systems. A key ADO.NET concept is the ability to develop database-independent code, and this is thoroughly explained in chapter 8. This allows code to be reused if the back-end database is changed, which is very beneficial for the developer.

Another area I found particularly useful was the chapter on working with stored procedures. The timing was perfect, since I was busy working on a project constructing a Windows interface to a SQL Server database. The application made extensive use of stored procedures. The explanation and code in this chapter made it easy to get my code working in no time.

The DataSet
If I had to rank the many features of ADO.NET, I’d have to rank the DataSet as the most important aspect of the technology. The DataSet makes it easy to manipulate data and utilize it in other aspects of an application. The third section of the book focuses on the DataSet with seven chapters. It begins with an introduction, working with the elements within the DataSet (tables, rows, columns), and ends with a discussion of remote use of DataSets. Given the importance of the DataSet, I found this section to be the most valuable in the book. The extensive explanations and accompanying code examples made it easy to get going with this important feature.

Data presentation
Connecting to a data source and working with the data is the foundation, but sooner or later the data will be displayed to the user. The fourth part of the book covers this aspect of ADO.NET development with a thorough examination of the data display options available to .NET developers. The main data control is the DataGrid, and it is available for both Windows and Web application development. There are other controls as well, and the book examines each with extensive sample code to validate the presentation.

XML cannot be avoided
XML is a buzzword, and Microsoft has embraced it with open arms. XML is a key aspect of the .NET platform as well as other Microsoft products like Microsoft Office and SharePoint. With that said, it’s not a big surprise that ADO.NET includes robust XML functionality. Part five of the book provides a good overview and introduction to ADO.NET XML features with an examination of DataSets, XML Schemas, searching XML documents, and SQL Server XML features. The example code is great, but numerous books devoted solely to this subject provide better coverage. These chapters provide a good introduction, but you should proceed to another resource if more information is required.

Are they really useful?
Part six of the book is called Useful Extras, but is this promise really true? The section includes coverage of connection pooling, distributed transactions, ADO and ADO.NET interoperability, and advice for fully realizing the ADO.NET feature set. The appendices provide a quick reference for the many features of ADO.NET, and they are not just a regurgitation of the Microsoft documentation. This section proved to be more useful than anticipated with a wealth of valuable information.

Where are you headed?
This book provides excellent, thorough coverage of ADO.NET. It is a valuable resource for any C# developer working with ADO.NET. But it is not an introductory C# programming book, so thorough programming knowledge is a requirement. VB.NET developers may find some of the information useful since C# and VB.NET are similar, but a book focused on VB.NET is more appropriate.

 

Editor's Picks