title: Conversion from string "" to type 'Integer' is not valid on a for each statement
body: <p>As the title says, I'm getting an error from my code below, which basically selects multiple inputs on a <code>ListView</code>, and puts it inside a database. Here's the code:</p>
  <pre><code>    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
          For Each item As ListViewItem In ListView1.SelectedItems
          Dim StudentID = Integer.Parse(item.SubItems(0).Text)
          Dim FirstName = item.SubItems(1).Text
          Dim LastName = item.SubItems(2).Text
              DBConn()
              SQLSTR = &quot;INSERT INTO '&quot; &amp; TextBox4.Text &amp; &quot;' (StudentID, FirstName, LastName) VALUES ('&quot; &amp; StudentID &amp; &quot;', '&quot; &amp; FirstName &amp; &quot;', '&quot; &amp; LastName &amp; &quot;') &quot;
              alterDB()
              MsgBox(&quot;Students succesfully added&quot;, msgboxtitle)
          Next
      MsgBox(&quot;Students added!&quot;, , msgboxtitle)
  End Sub
  </code></pre>
  <p>The exact error is:</p>
  <blockquote>
  <p>An unhandled exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll</p>
  <p>Additional information: Conversion from string &quot;&quot; to type 'Integer' is not valid.</p>
  </blockquote>