ADO.NET in a Nutshell by Bill Hamilton, Matthew MacDonald This errata page lists errors outstanding in the most recent printing. If you have technical questions or error reports, you can send them to booktech@oreilly.com. Please specify the printing date of your copy. This page was updated March 16, 2006. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification Confirmed errors: [17] 5th paragraph; OleDbConnection con = new OleDbConnection("Data Source=localhost;" + "Initial Catalog=c:\Nortwdind.mdb;" + "Provider=Microsoft.Jet.OLEDB.4.0"); should read: OleDbConnection con = new OleDbConnection( "Data Source=c:\Northwind.mdb;" + "Provider=Microsoft.Jet.OLEDB.4.0"); [21] Last paragraph under Disposing Connections; The paragraph states that Dispose() removes the connection from the connection pool and thus removes the key benefits of connection pooling. This is incorrect. Take a look at SqlConnection for example. The Open() method obtains a SqlInternalConnection from the connection pool and assigns it to the _internalConnection field. The Close() method returns this internal connection to the pool. The Dispose() method actually calls Close() so the internal connection is also returned to the pool in that case. The difference between Dispose() and Close() is that the SqlConnection object should not be reused after Dispose(), whereas after Close() the same SqlConnection object can be reopened. This has no bearing on the SqlInternalConnection object and thus makes no difference to the connection pooling mechanism. This is a known error in the MSDN help. {33} bottom of the page cmd.Add(param); should be: cmd.Parameters.Add(param); {34} top of page SqlParameter param = cmd.Add("@Description", SqlDbType.VarChar, 88, "Description"); should be: SqlParameter param = cmd.Parameters.Add("@Description", SqlDbType.VarChar, 88, "Description"); {53} Line 14; Error in codeline "if (r[i] != DBNull.Value)" Correct is: "if (r[i] == DBNull.Value)" {76} 2nd Paragraph from the bottom; "The Contains() method returns a value indicating whether a column with a specified name exists in the collection" Should read: "The Exists() method returns a value indicating whether a column with a specified name exists in the collection" {78} middle of the page; "The Contains() method returns a value indicating whether a column with a specified name exists in the collection" should read: "The Exists() method returns a value indicating whether a column with a specified name exists in the collection" (84) First example at the top of the page; The DataRow[] is instantiated as "errorRow" but, subsequently, is used (in the code) as "errorRows". {121} Last entry in Table 12-1; Comment shows filter criterion as "...at least $1000", but the filter selects for more than $1000, not at least $1000. {133} third line from page top; As shown, "...propertyFieldBinding; = new...". Should read "...propertyFieldBinding = new...". [195] second paragraph, third line; "As the isolation level increases, ..." It should read, "As the isolation level decreases, ..." (215) Table 17-4 The heading for Table 17-4 should read "MappingType values" Also, in the "SimpleContent" description, MappingStyle.Element should be: MappingType.Element (216) top of page; Col.ColumnMapping = MappingStyle.Attribute; should be: Col.ColumnMapping = MappingType.Attribute; [242] top of page; The OdbcConnection and OleDbConnection classes exhibit the same behavior in that Dispose() either calls Close() or executes the same code that Close() does. The underlying connection pooling mechanism (if enabled by the provider) should not be disabled by Dispose() as stated in the book. This is a known error in the MSDN help. (253) Table 19-3 Table is incorrectly titled "CommandType values" it should be titled "UpdateRowSource values" (354) near the bottom of the page, the first line below the subhead example; "... uses the GetParentRow() method ..." It should read "... uses the GetParentRows() method ..." {383} comment in next to last block of code; comment says RowState = Inserted it should be: RowState = Added {397} 2nd para under "notes"; Reference to Table 29-3 is wrong, it should say "Table 19-3"