View Single Post
  #1 (permalink)  
Old August 15th, 2008, 04:57 PM
daydream daydream is offline
Registered User
 
Join Date: Aug 2008
Location: Kazan, , Russia.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to daydream
Default Error in sample code

What if we start listing errors in sample code here?

I've found two in Chapter 4 (Testing the Database).

In a big piece of code on pages 116-118 are the following (bottom of p.117):

1. DataTable table = result.DataSet.Tables[0];
Using constant here is incorrect, should use (ResultSet-1) instead of 0:
   DataTable table = result.DataSet.Tables[ResultSet-1];


and three lines below

2. _colCount = _columnList.Split(new char[] { _delimiter }).Length + 1;
should not actually have that +1 in the end, i.e. correct is
   _colCount = _columnList.Split(new char[] { _delimiter }).Length;
Reply With Quote