Calling stored procedure with table type argument
<p>How do I call a stored procedure that takes a table type as an argument from OTL?</p>

<p>Here is how my database looks like:</p>

<pre><code>SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

DROP PROCEDURE IF Exists dbo.spTest
DROP TYPE IF Exists dbo.List

--- Create UDTT
CREATE TYPE dbo.List as TABLE
(
    k varchar(32) NOT NULL,
    v float NOt NULL
)
GO

CREATE PROCEDURE dbo.spTest
    @list List READONLY 
AS
    BEGIN
        SELECT * from @list     
    END
GO

--- Call spTEST

DECLARE @l List
INSERT INTO @l(k, v)
VALUES ('A', 1.0);

EXECUTE [dbo].[spTest]
      @list = @l
GO
</code></pre>

<p>I tried to code something up in C++ but I am not sure how to create the list argument or specify the list type</p>

<pre><code>otl_stream i(50, // buffer size
    "{call dbo.spTest("
    " :list&lt;char[32],in&gt; "
    ")}",    
    db, // connect object
  );
</code></pre>

<p>Update: The auditor of OTL Skuchin told me in a private email that is not possible.
"OTL doesn't support those. The best you can do is to insert a bunch of rows into a temp table / table variable via a regular insert and read from it in your SP"</p>