title: Identity column in a table-valued parameter in procedure, how to define DataTable
body: <p>Is it possible to pass a parameter of type "table" with a column of type "[int] IDENTITY(1,1)" to a procedure and execute this stored procedure with a DataTable object passed as the input parameter?</p>
  
  <p>I get the following error: "INSERT into an identity column not allowed on table variables.
  The data for table-valued parameter \"@xxxxx\" doesn't conform to the table type of the parameter."</p>
  
  <p>The only related comment I was able to find was "If you supply a value for an identity column in a table-valued parameter, you must issue the SET IDENTITY_INSERT statement for the session."</p>
  
  <p>It seems that even though the PK was not set in the table parameter, it gets set automatically at some point. Where does that happen and how can it be avoided?</p>