cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Stored Procedure Error

djung1
3-Visitor

Stored Procedure Error

Hi guys,

I'm trying to run a service that is a SQL query that execute a Stored Procedure from MSSQL.

execute.PNG

When I try to execute the query on ThingWorx, I get the following error:
error.PNG

However, when I execute this exactly stored procedure on SQL Management Studio, it works fine and get the following result:

result.PNG

Does anyone know how to solve this?

Thanks,

De Hong

1 ACCEPTED SOLUTION

Accepted Solutions
djung1
3-Visitor
(To:djung1)

I fixed the problem.
Based on another post here, I just wrote "SET NOCOUNT ON;" in the procedure and it worked!

But Thanks Sushant Pandey!

View solution in original post

2 REPLIES 2
supandey
19-Tanzanite
(To:djung1)

Hi De Hong, what sort of an sql statement that procedure is executing? I just tested with SQLQuery service with following procedure that requires an input parameter

execute demoproc3 @colname =2

And it works fine. Note procedure contains select statement and returning single column as result

djung1
3-Visitor
(To:djung1)

I fixed the problem.
Based on another post here, I just wrote "SET NOCOUNT ON;" in the procedure and it worked!

But Thanks Sushant Pandey!

Top Tags