Page 1 of 1

Passing records in table-valued parameter

Posted: Mon 05 Feb 2018 13:01
by dcvitoria
I have a virtual table with several data and I want to use the table-valued parameter. I already created it in SQL Server and everything works okay over there. My question is how to implement within TUniStoredProc so it can read my virtual table at once.


DECLARE @AIPTYPE AS A_PEDIDO_ITENS_TYPE;

INSERT INTO @AIPTYPE(CODIGO_PEDIDO, CODIGO_PRODUTO, QUANTIDADE, VALOR_UNITARIO_PRODUTO, VALOR_TOTAL_PRODUTO)
VALUES
(1,1,1,1,1),
(2,2,2,2,2);

EXEC PROC_INSERE_ITEM_PEDIDO @AIPTYPE

The code above works 100% in sql... how change the values with data on delphi virtual table?

Re: Passing records in table-valued parameter

Posted: Tue 06 Feb 2018 09:38
by Stellar
Unfortunately, UniDAC does not support Table-valued parameters. Since this functionality is specific only for SQL server. This functionality is implemented in SDAC.

Using the Table-Valued Parameters in SDAC: https://www.devart.com/sdac/docs/index. ... meters.htm

Re: Passing records in table-valued parameter

Posted: Tue 06 Feb 2018 10:14
by dcvitoria
Stellar wrote:Unfortunately, UniDAC does not support Table-valued parameters. Since this functionality is specific only for SQL server. This functionality is implemented in SDAC.

Using the Table-Valued Parameters in SDAC: https://www.devart.com/sdac/docs/index. ... meters.htm

Thank you for support!