title: A first chance exception of type 'System.IndexOutOfRangeException' occurred in System.Data.dll
body: <p>I've just moved this code to a new sub and tried to run it and get the exception as said in the tite. </p>
  
  <pre><code>Public Sub LoadPanel(TableName As String)
  
      Debug.Print("LoadPanel:") 'name of module
      PushCallStack("LoadPanel") 'name of module
  
      Try
          Using dbConnection As New OleDbConnection(My.Settings.SMSA_databaseConnectionString)
              dbConnection.Open()
              Debug.Print("   dbConnection Success")
  
              Dim sqlcommand As String
              sqlcommand = "SELECT " &amp; TableName &amp; ".[PanelName] FROM  " &amp; TableName &amp; " WHERE (((" &amp; TableName &amp; ".[Owner])=" &amp; CurrentClientID &amp; ")) OR (((" &amp; TableName &amp; ".[Admin1])=" &amp; CurrentClientID &amp; ")) OR (((" &amp; TableName &amp; ".[Admin2])=" &amp; CurrentClientID &amp; ")) OR (((" &amp; TableName &amp; ".[Admin3])=" &amp; CurrentClientID &amp; ")) OR (((" &amp; TableName &amp; ".[Admin4])=" &amp; CurrentClientID &amp; "));"
              Debug.Print("   sqlcommand = " &amp; sqlcommand)
  
              Dim getSomeData As New OleDbCommand(sqlcommand, dbConnection)
              With getSomeData
                  .Parameters.AddWithValue("@variableName", "variableValue")
                  Debug.Print("   Executing: getSomeData")
              End With
              Debug.Print("   Success: getSomeData")
  
              Debug.Print("   Try: DataReader")
              Using dataReader As OleDbDataReader = getSomeData.ExecuteReader
                  Do While dataReader.Read
                      Dashboard_Client.ComboBox_PanelChoice.Items.Add(dataReader("PanelIP"))
                  Loop
              End Using
          End Using
  
          PopCallStack() 'do not remove
      Catch ex As Exception
          GlobalErrHandler()
      End Try
  
      Debug.Print("LoadPanel End")
  </code></pre>
  
  <p>From the debug panel:</p>
  
  <pre><code>LoadPanel:
  dbConnection Success
  Executing: getSomeData
  Success: getSomeData
  Try: DataReader
  A first chance exception of type 'System.IndexOutOfRangeException' occurred in System.Data.dll
  </code></pre>
  
  <p>Is there a way to resolve this error or make a work around in order to keep the functionality?</p>
  
  <p>Thanks.</p>