Instead of reinventing the wheel, the company Ramirez works for decided to use a framework to build their Web Framework. Unfortunately, they may have made a poor choice. When they found out it does "crazy things" like saving reports as PDFs (which are stored locally) and then routing them through an IIS web service, they decided to take a closer look at the code.

Without giving too much away, Ramirez identified (in the following code) three reasons he drinks. Consider it a Rorschach test: what do you see?

 

      For Each cmd In cmds
          Try
              DbReader2 = cmd.ExecuteReader
          Catch ex As Exception
              If ex.Message = "Invalid column name 'Result'." Then
                  If n = 0 Then
                      n = n + 1
                      GoTo CloseCmd
                  Else
                      Continue For
                  End If
              End If
          End Try
      Next

  CloseCmd:
      ...