title: Can't execute store procedure in rails console (activerecord-sqlserver-adapter)
body: <p>I'm using rails console trying to execute the following store procedure:</p>
  
  <pre><code>exec dbo.MP_RPT_Q_VENTAS_TOP_PRODUCTOS @COD_CTE='',@COD_DOC='T',@FECHA1='2015-01-01',@FECHA2='2015-23-06',@COD_GRUPO='',@COD_ZONA='',@PORCENTAJE=30,@DESCRI='',@MIN='X',@CONTADO='',@COD_AGRICOLA='',@COD_GRUPO_PROD_INTERES='',@UTILIDAD_MAXIMA='101',@CATEGORIA='',@FILTRAR_VALOR='C',@CODIGO_INGREDIENTE_ACTIVO='',@CODIGOS_PRODUCTOS='',@CLASIFICACION='T',@ORDEN='$UTILIDAD',@FORMATO_ASP='0',@CLASIFICACION2='T',@CLASIFICACION3='T',@TIPO_CLIENTE='TODOS',@COD_LOTE=''
  </code></pre>
  
  <p>To do so, I'm running the following command, note that I striped the parameters and only left the values:</p>
  
  <pre><code>Almacen.execute_procedure("MP_RPT_Q_VENTAS_TOP_PRODUCTOS", '','T','2015-01-01','2015-23-06','','',30,'','X','','','','101','','C','','','T','$UTILIDAD','0','T','T','TODOS','')
  </code></pre>
  
  <p>When I try to run that line, I get the following error:</p>
  
  <pre><code>TinyTds::Error: The conversion of a varchar data type to a smalldatetime data ty
  pe resulted in an out-of-range value.: EXEC MP_RPT_Q_VENTAS_TOP_PRODUCTOS '', 'T
  ', '2015-01-01', '2015-23-06', '', '', 30, '', 'X', '', '', '', '101', '', 'C',
  '', '', 'T', '$UTILIDAD', '0', 'T', 'T', 'TODOS', ''
  ActiveRecord::StatementInvalid: TinyTds::Error: The conversion of a varchar data
   type to a smalldatetime data type resulted in an out-of-range value.: EXEC MP_R
  PT_Q_VENTAS_TOP_PRODUCTOS '', 'T', '2015-01-01', '2015-23-06', '', '', 30, '', '
  X', '', '', '', '101', '', 'C', '', '', 'T', '$UTILIDAD', '0', 'T', 'T', 'TODOS'
  , ''
          from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activerecord-sqlserver-adapt
  er-4.0.0/lib/active_record/connection_adapters/sqlserver/database_statements.rb:
  96:in `each'
          from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activerecord-sqlserver-adapt
  er-4.0.0/lib/active_record/connection_adapters/sqlserver/database_statements.rb:
  96:in `block in execute_procedure'
  
  ...
  </code></pre>
  
  <p>I tried changed by changing those dates by stripping quotes between them, and the store is executed, but with no results, which is not correct.</p>
  
  <p>Any ideas?</p>