I have 1 issue when using Execute Query. I specified all necessary, but I always get empty value from Output parameter.
I already assigned ID = 1 in Sequence
I tested in the procedure in sql database, it runs OK
Do you have any advice or have you ever met this issue?
I’ve tried your solution. The system said that there is no rows(0). It seems that this activity does not work with output para. I have to change my stored procedure in database like this
and use Table.Rows(0).Items(“IssuedItemMaterialName”) to get value from IssuedItemMaterialName
ALTER PROCEDURE [dbo].[GetIssuedItem] @id int
AS
BEGIN
– SET NOCOUNT ON added to prevent extra result sets from
– interfering with SELECT statements.
SET NOCOUNT ON;
SELECT IssuedItemMaterialId, IssuedItemMaterialName, IssuedItemLotNo
FROM IssuedForProduction
WHERE ID = @id
if you want to get values form the stored-procedure via output-parameters, you need to use ExecuteNonQuery instead of ExecuteQuery.
ExecuteQuery only returns a Datatable → result from the procedure
ExecuteNonQuery returns how many rows are affected in the output-datatable and the output-parameters.