title: Getting error: Unable to cast object of type 'System.Int64' to type 'System.String'
body: <p>I seem to keep getting the error "Unable to cast object of type 'System.Int64' to type 'System.String'." when trying to grab a column from one table and put it into another. I've created the following SQL Script for it:</p>
  
  <pre><code>STUFF (ISNULL( (SELECT 
                        (SELECT '§§ ' + CONTEXT
                        FROM NOTES P2
                        WHERE P2.CustomerID = P1.CustomerID
                        ORDER BY Customerid
                        FOR XML PATH('') )
                        FROM NOTES p1 WHERE CUSTOMERID IN (CUSTOMERS.CUSTOMERID)
                        GROUP BY Customerid 
                        ),'')  ,1, 1, '') DriverNotes
  </code></pre>
  
  <p>And in VB.NET I have the following example:</p>
  
  <pre><code>info.EmergencyContact = .GetString(31)
  info.EmergencyContactPhone = .GetString(32)
  info.DriverNotes = .GetString(33)
  </code></pre>
  
  <p>I only get the error when <code>info.DriverNotes = .GetString(33)</code> is present, otherwise everything works fine without it. I have tried multiple things which include using <code>CAST</code> and <code>CONVERT</code> in SQL but no luck there.</p>