06-08-2018 08:53 AM
Hello,
I use stored procedures a lot in LV to interact with database.
Now I need to pass large data set into stored procedure,
this seems like the best option. How can pass custom types using NI DB connectivity toolkit? I can choose only basic types like string or numeric
06-08-2018 01:46 PM
06-10-2018 12:37 PM
Sory for late response
For example:
DECLARE @myVar AS TestType;
INSERT INTO @myVar
VALUES
(1,'233333332'),
(2,'asd');
EXEC MultipleInsert @myVar
I can do this directly from SSMS and executes fine.
When I try to pass custom data type to stored procedure using LV I always get error about invalid argument data types.
06-11-2018 03:56 AM
Two points:
First, how large is large? Are we talking a couple hundred bytes or a couple million?
Second, the problem is the DBCT. It is large and cumbersome, and as you are finding, unnecessarily restrictive.
Better to use ADO to talk directly to the DBMS.
Mike...
06-11-2018 04:33 AM
Thanks for reply.
We are talking about ~5k rows to insert and inserting row by row using SP will take too long.
I can use ado directly but problem will remain the same - how to pass my custom structure into parameter correctly and how to get size correctly
06-12-2018 12:22 PM
I have tried multiple other options and still can not get it right for custom types.
I have tried from C# and works without problems.
10-21-2020 07:35 AM
Hi,
sorry for putting up this older thread, but did you finally get it running using LabVIEW and TVP's?
Thanks for an answer!