Management and Administration > Workspace Management > Management Console > SmartObject Services > SmartObject Services > SQL Server Service > Stored Procedures | Send feedback |
For integration with stored procedures this service will cater for two method types:
Important: Output and Read methods are unsupported. |
Fig. 1. SQL Service Object Store Procedure Methods displayed in the K2 Object Browser
To return @@IDENTITY creates a List stored procedure.
Copy Code |
---|
CREATE PROCEDURE [dbo].[ToReturnIdentityValue] @Desc NVARCHAR(50), @TextValue NVARCHAR(MAX) = 'no value supplied', @IntValue INT = -1 AS BEGIN INSERT INTO [WithCRUD] ([Description] ,[TextValue] ,[IntValue]) VALUES (@Desc ,@TextValue ,@IntValue)
SELECT @@IDENTITY END GO |
ONLY Execute method creates an Execute method
Copy Code |
---|
CREATE PROCEDURE [dbo].[OnlyExecute] -- Add the parameters for the stored procedure here @ID INT = 0, @Desc NVARCHAR(50), @TextValue NVARCHAR(MAX) = 'no value supplied', @IntValue INT = -1 AS BEGIN INSERT INTO [WithoutCRUD] ([ID] ,[Description] ,[TextValue] ,[IntValue]) VALUES (@ID ,@Desc ,@TextValue ,@IntValue) END GO |
ONLY List method creates a List method
Copy Code |
---|
CREATE PROCEDURE [dbo].[OnlyList] -- Add the parameters for the stored procedure here AS BEGIN SELECT [ID] ,[AutoNumber] ,[Description] ,[TextValue] ,[IntValue] FROM [WithoutCRUD] END GO |