title: How to retrieve all errors and messages from a query using ADO
body: <p>When a SQL batch returns more than one message from e.g. print statements, then I can only retrieve the first one using the ADO connection's Errors collection. How do I get the rest of the messages?</p>
  
  <p>If I run this script:</p>
  
  <pre><code>Option Explicit
  Dim conn
  Set conn = CreateObject("ADODB.Connection")
  conn.Provider = "SQLOLEDB"
  conn.ConnectionString = "Data Source=(local);Integrated Security=SSPI;Initial Catalog=Master"
  conn.Open
  
  conn.Execute("print 'Foo'" &amp; vbCrLf &amp; "print 'Bar'" &amp; vbCrLf &amp; "raiserror ('xyz', 10, 127)")
  
  Dim error
  For Each error in conn.Errors
      MsgBox error.Description
  Next
  </code></pre>
  
  <p>Then I only get "Foo" back, never "Bar" or "xyz".</p>
  
  <p>Is there a way to get the remaining messages?</p>