(Full Disclosure: I was a tech reviewer for this book and received a free copy)

ADO.NET 3.5 Cookbook

I read the ADO.NET 3.5 Cookbook last November coincidentally while I was writing automatic image fetching from SQL Server and OleDB databases into DotImage 6.0 (DbImageSoruce).

I've been using the various incarnations of Microsoft data access technologies for quite some time and have been using ADO.NET for a few years, so I wondered whether I was going to learn anything new from this book. It covers all of the territory to get started (connection strings, basic usage of ADO.NET classes, etc.), but what I really appreciated was that it topics that advanced ADO.NET users would find useful and I certainly learned a few new tricks.

The topic on writing provider and database independent code (Section 10.22) which covers how to do it right if you are targeting .NET 1.1 (which we do) was particularly useful to me. Chapter 10 (Optimizing .NET Data Access) is just generally a good chapter no matter what your level and covers asynchronous SQL calls (executing and cancelling), ASP.NET data caching, paging queries, SQL Server stored procedure debugging and more.

The other thing I liked was the general best practices advice that was sprinkled into the recipes in appropriate places. If you are new to writing DB code, read the "Storing Connection Strings" section (1.1) carefully so that you do it correctly. Bill not only explains how, but why. And since this is the first recipe, it sets the tone for the rest of the book as being practical ("here's the code"), but also gives you the background to understand it.

Since my job was to actually run every code snippet, I can vouch for their quality. Most are built off the AdventureWorks sample database that comes with SQL Server Express, so they are ready to run. The rest come with full DDL to create what you need (databases, stored procedures, etc), and the code and SQL is available online so you don't have to type it in.

And, of course, since it's updated for ADO.NET 3.5, it includes information on LINQ and SQL Server 2008.