title: How do I improve the database performance when going from VBA to SQL Server 2008 R2?
body: <p>I am working on a financial application that performs CRUD operations from Excel to SQL Server 2008 R2. The application uses VBA and ADO. I am trying to optimize the performance of an operation that loops through thousands of rows and sends updates to the database. Currently, a stored procedure gets called once for each row.</p>
  
  <p>When users have slow connections to the application the performance is slow too, enough that they have started complaining. To optimize the performance, I tried:</p>
  
  <ol>
  <li>Batching all of the operations into an XML file and sending them all at once. Unfortunately the performance got worse. </li>
  <li>Next I thought of batching all of the updates in a table-valued parameter. However, VBA and ADO can’t use table-valued parameters. </li>
  </ol>
  
  <p>I am running out of things to try. How do I improve the database performance when going from VBA to SQL Server 2008 R2?</p>