title: Invalid error: The number of parameters does not match number of values for stored procedure
body: <p>Database.LoadDataSet working incorrect with SQL Server 2017 database.</p>
  
  <p>We are migrating our database from SQL Server 2008 R2 to SQL Server 2017. Database is created with compatiblity mode 100 - to be compatible with SQL Server 2008 R2. I got stuck with some old code, which produces not informative exception.</p>
  
  <p>There is a problem with command Database.LoadDataSet, which is calling stored procedure, which accepts 2 parameters. With SQL Server 2008 R2 it works just fine, but with SQL Server 2017 it fails.The error is that there are not enough SQL parameters. But the funny part is that there are enough parameters passed. I am trying to find a solution, compared old database with new one, and properties seem to be the same for database and stored procedure.</p>
  
  <p>.NET CLR Version on IIS App pool:  2.0</p>
  
  <p>.NET target Framework version: 3.5</p>
  
  <pre><code>//.NET C# code:
  DataSet dataset;
  Database db = DatabaseFactory.CreateDatabase();
  db.LoadDataSet(
  "USP_Proc", 
  dataset, 
  new string[] {"Titles", "Config", "Teams"}, 
  Request.QueryString["Type"], 
  int.Parse(Request.QueryString["BranchID"]));
  
  
  //SQL Procedure:
  
  SET ANSI_NULLS OFF
  SET QUOTED_IDENTIFIER ON
  
  ALTER PROCEDURE [dbo].[USP_Proc]
  @BranchType VARCHAR (15), @BranchId [dbo].[ID]
  AS
  SELECT 
    TitleId, Title 
  FROM vOperatorTitles
  ORDER BY Title
  
  IF @BranchType = 'L'
  BEGIN
    SELECT OperatorTeams 
    FROM tCustomerConfig 
    WHERE CustomerId = @BranchId
  
    SELECT TeamId, TeamName 
    FROM tTeams
    WHERE CustomerId = @BranchId
  END
  
  SELECT count(*) as ISSTAGEMANAGEMENT   
  FROM tfeature_branch 
  WHERE
     branchid=@BranchId and 
     systemside=@BranchType and 
     featureid = (select featureid from tfeature where featurecode= 'somecode')
  
  
  
  
  
  
  
  
  
  Expected: there is no errors (as on environments which use old SQL Server)
  
  Actual: 
  When calling db.LoadDataSet, there is an error:
  
  [InvalidOperationException: The number of parameters does not match number of values for stored procedure.]
     Microsoft.Practices.EnterpriseLibrary.Data.Database.GetStoredProcCommand(String storedProcedureName, Object[] parameterValues) +384
     Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(String storedProcedureName, DataSet dataSet, String[] tableNames, Object[] parameterValues) +42
     SupportConsole.Pagelets.OperatorAdd.Page_Load(Object sender, EventArgs e) in E:\Source\Pagelets\OperatorAdd.ascx.cs:88
     System.Web.UI.Control.OnLoad(EventArgs e) +132
     System.Web.UI.Control.LoadRecursive() +66
     System.Web.UI.Control.LoadRecursive() +191
     System.Web.UI.Control.LoadRecursive() +191
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
  </code></pre>