title: Stored procedure doesn`t return OUT parameter
body: <p>I have problem with using stored procedures to create item in the MSSQL 2008 Database.
  I`m using Flex on client side with ADEP for server connection.</p>
  
  <p>Database procedure is quite simple:</p>
  
  <pre><code>ALTER PROCEDURE [dbo].[testInsert_procedure]
      @id INT OUT,
      @v1 VARCHAR(50) = NULL,
      @v2 VARCHAR(50) = NULL
  AS
  BEGIN
      SET NOCOUNT ON;
  
      -- Insert statements for procedure here
      INSERT INTO test1 (v1, v2)
      VALUES (@v1, @v2)
  
      SET @id = SCOPE_IDENTITY();
      SELECT @id as id;
  END
  GO
  </code></pre>
  
  <p>This is the destination from config file for this stored procedure:</p>
  
  <pre><code>&lt;destination id="TestTableInsert"&gt;
      &lt;adapter ref="java-dao" /&gt;
      &lt;properties&gt;
        &lt;source&gt;flex.data.assemblers.SQLAssembler&lt;/source&gt;
        &lt;scope&gt;application&lt;/scope&gt;
        &lt;metadata&gt;
          &lt;identity property="id"/&gt;
        &lt;/metadata&gt;
        &lt;server&gt;
          &lt;database&gt;
            &lt;datasource&gt;java:comp/env/jdbc/TEST&lt;/datasource&gt;
          &lt;/database&gt;
          &lt;actionscript-class&gt;classes.TestClass&lt;/actionscript-class&gt;
          &lt;create-item&gt;
            &lt;procedure name="testInsert_procedure"&gt;
              &lt;procedure-param property-value="#id#" type="OUT" /&gt;
              &lt;procedure-param property-value="#v1#" /&gt;
              &lt;procedure-param property-value="#v2#" /&gt;
            &lt;/procedure&gt;
          &lt;/create-item&gt;
        &lt;/server&gt;
      &lt;/properties&gt;
    &lt;/destination&gt;
  </code></pre>
  
  <p>Using of this configuration gives next error:</p>
  
  <pre><code>Jun 25, 2013 2:47:26 PM org.apache.catalina.core.ApplicationContext log
  INFO: [Data Services] [DEBUG] SQL Assembler jdbc exception on operation=create-item error=com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1.
      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
  </code></pre>
  
  <p>I`have found that is might be JDBC bug...
  So, it just wrong configuration to get OUTPUT parameters or this is really JDBC bug?</p>
  
  <p><strong>Update</strong>: Java is using on the server side with Microsoft JDBC driver 4.0</p>