Unused SQL Query

I was moving some of my code to .Net 3.5 earlier this week and cleaning up some of the migration issues. One of the warnings was that readJobs was an unused local variable. Not too unusual, till I found that it was this gem it was referencing:

Dim readJobs As SqlDataReader = cmdJobs.ExecuteReader(CommandBehavior.Default)
While readJobs.Read()
End While
readJobs.Close()

Comments are closed.