title: VB.NET ADODB.Recordset and SQL Server 2019 Latin1_General_100_CI_AI_SC_UTF8 Collation hangs application
body: <p>I have a requirement to add UTF8 support in a legacy application that still uses ADODB and recordsets.  In sql server 2019, I have configured my db to use Latin1_General_100_CI_AI_SC_UTF8 collation.  Now, when I try to query my data into a recordset, my application just hangs.  I was able to pin point my issue to a line of code configuring the recordset.</p>
  
  <pre><code>Connect = CreateObject("ADODB.Connection")
  Connect.Open(MyConnectionString) &lt;== Provider=SQLOLEDB.1;Integrated Security=SSPI;Data Source=servername;Initial Catalog=Test
  rs = CreateObject("ADODB.Recordset")
  rs.ActiveConnection = Connect
  rs.CursorType = ADODB.CursorTypeEnum.adOpenForwardOnly
  rs.LockType = ADODB.LockTypeEnum.adLockReadOnly
  rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient &lt;== When set, causes the app to hang
  rs.Open("SELECT columnName FROM dbo.table")  &lt;== Assumes db collation is set to UTF8. When CursorLocation  is set to client, application will hang here
  or
  rs.Open("SELECT columnName COLLATE Latin1_General_100_CI_AI_SC_UTF8 FROM dbo.table")  &lt;== When CursorLocation is set to client, application will hang here
  If rs.EOF = False Then  &lt;== When CursorLocation is not set to client, application will hang here
      ...
  End If
  rs.Close()
  conn.Close()
  </code></pre>
  
  <p>When I comment out that line of code, I'm able to load the recordset but as soon as I try to loop it, the application hangs again at the rs.EOF and I have to force quit.</p>
  
  <p>Has anyone had any luck using the new UTF8 collation in SQL Server 2019 with ADODB?  Since the components are quite old, there is not too much out there in terms or support for them. Any help you can provide would be greatly appreciated.</p>