title: Get Value of Primary key generated by stored procedure in VB
body: <p>Note: this stored procedure is in use by the company and I can't change it.</p>
  
  <p>Here is part of the stored procedure:</p>
  
  <pre><code>    DECLARE @tmp_PERSON TABLE(PERSON_PK INT);
          INSERT INTO [Ks4_ENTITY_PERSON]
                     ([TITLE_FK]
                     ,[INITIALS]
                     ,[FIRSTNAME]
                     ,[MIDDLENAME]
                     ,[KNOWNAS]
                     ,[SURNAME]
                     ,[GENDER_FK]
                     ,[DATEOFBIRTH]
                     ,[HOME_LANGUAGE_FK]
                     ,[IDNUMBER_TYPE_FK]
                     ,[IDNUMBER]
                     ,[MATURITY_FK]
                     ,[MARITAL_STATUS_FK]
                     ,[MARITAL_DATE]
                     ,[MARITAL_REGIME_FK]
                     ,[CITIZENSHIP1_COUNTRY_FK]
                     ,[CITIZENSHIP2_COUNTRY_FK]
                     ,[TAX_NUMBER]
                     ,[SUFFIX_FK]
                     ,[SALUTATION_FK]
                     ,[RESIDENT_COUNTRY_FK]
                     ,[IS_PENSIONER]
                     ,[OCCUPATION_FK])
               OUTPUT inserted.PERSON_PK INTO @tmp_PERSON &lt;---- THIS LINE??!?
               VALUES
                     (@TITLE_FK
                     ,@INITIALS
                     ,@FIRSTNAME
                     ,@MIDDLENAME
                     ,@KNOWNAS
                     ,@SURNAME
                     ,@GENDER_FK
                     ,@DATEOFBIRTH
                     ,@HOME_LANGUAGE_FK
                     ,@IDNUMBER_TYPE_FK
                     ,@IDNUMBER
                     ,@MATURITY_FK
                     ,@MARITAL_STATUS_FK
                     ,@MARITAL_DATE
                     ,@MARITAL_REGIME_FK
                     ,@CITIZENSHIP1_COUNTRY_FK
                     ,@CITIZENSHIP2_COUNTRY_FK
                     ,@TAX_NUMBER
                     ,@SUFFIX_FK
                     ,@SALUTATION_FK
                     ,@RESIDENT_COUNTRY_FK
                     ,@IS_PENSIONER
                     ,@OCCUPATION_FK)  
  </code></pre>
  
  <p>How can I get the value <code>PERSON_PK</code> that was inserted into that <code>@tmp_PERSON</code>
  from my VB app?</p>
  
  <p>NOTE: <code>@tmp_Person</code> is a on the fly declared table, not a predefined <code>@VAR OUTPUT</code> type </p>