I’ve got the sp working in the SSMS:
CREATE PROCEDURE [inv].[usp_FilterItems]
-- Add the parameters for the stored procedure here
@catalog int = null,
@master int = null,
@description varchar(255) = null
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT CatalogNumber, MasterNum, Description
FROM inv.Items
WHERE (CatalogNumber = @catalog OR ISNULL(@catalog, '') = '')
OR (MasterNum = @master OR ISNULL(@master, '') = '')
OR (Description LIKE '%' + @description + '%' OR ISNULL(@description, '') = '');
END
GO
From Ignition Docs, it looks like I can call it via:
exec inv.usp_FilterItems
However, (using the onActionPerformed, Script Action), it does not like me using the SP’s parameter name (@master
) to pass a value. There are three params, and if only one value or string is passed, how do I tell Ignition which one is which?
exec inv.usp_FilterItems , , value
exec inv.usp_FilterItems value
exec inv.usp_FilterItems null, null, value
I get messages stating no viable input or mismatched input. If I use the second line, I should get an error regarding incorrect data type.
Well, except that Ignition says ‘inv’ is not a valid name, which is the schema name and part of the SP’s name.
Side question:
If I make changes to the DB, do I need to refresh the project, and if so, is there another way than closing and reopening it?