DbDataReader Mishap

by Donn Felker 9. August 2007 11:51

This is something that I'm almost afraid to admit to. *sheepish grin*

I was debugging a DbDataReader Unit Test and all of a sudden it started to fail. After  about 5 minutes of thrashing I saw that I had put the DbDataReader object into the Watch window (which was not pinned -- therefore I could not see it). I was checking a value of the DbDataReader and working with it in the watch window. Well, I forgot to remove that watch, and as soon as the unit test started again, it bombed bout because as soon as the DbDataReader was available it attempted to perform some work on it (before the Read method was called). Therefore when we did call anything on the DbDataReader later in the game, it blew up because it had already thrown  an exception in the watch window.

Ooops. :)

Moral of the story: Make sure you delete your watch variables when you're done. Oops. :) Perhaps I should be using the Auto's window instead. :)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Donn Felker

Senior Consultant
MCTS
ScrumMaster
Agile Practitioner

About Me | Books I Recommend

Gotta Pay The Bills


Tag cloud

    Popular Posts

    RecentComments

    Comment RSS

    Calendar

    <<  January 2009  >>
    MoTuWeThFrSaSu
    2930311234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    View posts in large calendar