title: Getting ID after insert in SQL Server
body: <p>I use this stored procedure to make insert and return the id of inserted row</p>
  
  <pre><code>ALTER PROCEDURE [dbo].[addObjective]
  (
              @Name nvarchar(250)
             ,@ObjectiveGroupId int
             ,@CreatorId int
             ,@LanguageId int
             ,@isFinal bit
  )
  as 
  insert into Objective values
  (
              @Name
             ,@ObjectiveGroupId
             ,@CreatorId
             ,GETDATE()
             ,@LanguageId
             ,@isFinal
  )
  
      select scope_identity() as Id;
  </code></pre>
  
  <p>But how to read the returned id using <code>vb.net</code> code</p>
  
  <p>using this commands return <code>-1</code></p>