Question

SQLExecutor + Stored Procedure in MSSQL: Executed or not?

  • 15 November 2012
  • 2 replies
  • 1 view

Badge +21
When using the SQLExecutor with a Normal SQL like:

 

SELECT *

 

FROM mytable

 

WHERE id LIKE 11111

 

 

It will return an attribute "_matched_records" with the number of records matched in from TRIGGER port.

 

 

However when using an EXEC-statement this does not seem to happen. Like this:

 

EXEC @return_value = [dbo].[myStoredProcedure] @ID = N'@Value(IID)',

 

@myTableValue = N'@Value(myValue)',

 

 

 

So after doing this it is not possible to figure out if the EXEC have actually run and inserted the needed attribute - or if there is an error performing this request. Anyone with a good workaround OTHER than doing another SQLExecutor to try to read back the data and try to compare the features? (Many features = alot of time reading and writing)

2 replies

Badge +21
A thank you goes to Ken Bragg that helped solve this issue. The solution was to add SET NOCOUNT ON; on the StoredProcedure.
Userlevel 4
Badge +13
Although I have to admit - I stumbles upon that while doing a really complicated work-around. Luck!

Reply