Passing records in table-valued parameter

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dcvitoria
Posts: 2
Joined: Mon 05 Feb 2018 12:56

Passing records in table-valued parameter

Post by dcvitoria » Mon 05 Feb 2018 13:01

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?

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: Passing records in table-valued parameter

Post by Stellar » Tue 06 Feb 2018 09:38

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

dcvitoria
Posts: 2
Joined: Mon 05 Feb 2018 12:56

Re: Passing records in table-valued parameter

Post by dcvitoria » Tue 06 Feb 2018 10:14

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!

Post Reply