NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Stored Procedure with TestStand to SQL 2000

When I run the Stored Procedure in the query analyzer it returns the recordset fine. I am not specifying any parameters. I am Using TestStand 2.01 and SQL Server 2000. I am using the OPEN SQL STATEMENT step to call the SP. When I run the SP in TestStand I get no data returned. If I run the SQL statment in TestStand I get the data that I am requesting. Does TestStand not support stored procedures.
0 Kudos
Message 1 of 4
(4,289 Views)
Are you closing the stored procedure data operation before you access the data?. The output data is not going to be ready unless you call a data operation step in mode "Close - Close and Get Output Parameters" if you are using a SQL Statement that calls a stored procedure.

Best Regards,

Alejandro del Castillo
Application Engineer (NI)
0 Kudos
Message 2 of 4
(4,289 Views)
If I enter a SELECT statement I don't have to close anything. When I used the stored procedure what am I supposed to close using the DATA operation. Under the data operation I don't see anything to close records. Can you give me an example of what you mean, thanks.
0 Kudos
Message 3 of 4
(4,289 Views)
Hi,

The instructions that I posted were for TestStand 3.0. In version 3.0 you can call stored procedures with input/output paramateres and to support this functionality the data operation step support several new modes.

TestStand 2.0.1 does not support parameters on stored procedures, but it does support calling stored procedures that do not take parameters. To be able to access the data back from the database you need to set the cursor location (in the Advanced tab of the Open SQL Statement step) to Client (http://digital.ni.com/public.nsf/websearch/0EF68BF97AB1A61F86256B8E007D70C0?OpenDocument).

By changing the cursor to Client I was able to succesfully call a stored procedure from TestStand 2.0.1 and to read back the recordse
t return by the database. Please let me know if you are still experiencing dificulties.

Best regards,

Alejandro del Castillo
National Instruments
0 Kudos
Message 4 of 4
(4,289 Views)