title: IndexOutOfRangeException SqlDataReader reading bool value from table
body: <p>I've 3 tables: <code>users</code>, <code>feed(id,body,title,link)</code> and <code>userstofeed(id,userid,feedid,isread)</code> while i'm trying to read bool value from userstofeed table it bring <code>IndexOutOfRangeException</code>. Tell me please what I'm doing wrong</p>
  
  <pre><code>while (reader.Read())
  {
       rssFeed.Title = reader["title"].ToString();
       rssFeed.Body = reader["body"].ToString();
       rssFeed.Link = reader["link"].ToString();
       rssFeed.IsRead = (bool) reader["isread"]; //IndexOutOfRangeException here
       yield return rssFeed;
  }
  </code></pre>
  
  <p>And here sql store procedure: </p>
  
  <pre><code>create proc spGetItemsByUser
  @userName nvarchar(50)
  as
  begin
  declare @userId int
  declare @feedId table (id int)
  
  select @userId = id 
  from Users 
  where name = @userName
  
  insert into @feedid (id)
  select feedid, isread 
  from userstofeed 
  where userid = @userId
  
  select * from feed where id in (select id from @feedId)
  select isread from userstofeed where userid = @userId //Here I'm getting bit if it read or not
  end
  </code></pre>