Skip to main content
Aug 27, 2018 7:29 AM UTC
Solved

How to Create a Stored Procedure from thingworx service

I want to create a stored procedure from thingworx service, when I'm run test it throw an error 

"Unable to Invoke Service ListServices on  TestDatabase: Incorrect syntax near 'GO'. "

for example:

USE [SERVICE1]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 
CREATE PROCEDURE [dbo].[ListServices]
@product_id nvarchar(32)
AS
BEGIN
.........
END
supandeyAnswer
Aug 27, 2018 11:57 AM UTC

Hi @vxba could you try something like this :

 

Create procedure dbo.demoProc1
@Sno int
AS
SET NOCOUNT ON;
Select * from table1
where sNO = @Sno;

Let me know if there's any issue.

2 replies

supandeyAnswer
Aug 27, 2018 11:57 AM UTC

Hi @vxba could you try something like this :

 

Create procedure dbo.demoProc1
@Sno int
AS
SET NOCOUNT ON;
Select * from table1
where sNO = @Sno;

Let me know if there's any issue.

vxbaAuthor
Nov 20, 2018 3:49 AM UTC

Thank you! It worked for me