Wednesday 18 June 2008

AgilePoint Snippet - Stored Procedure and Custom Attributes

To get data out of your database and into a custom attribute, you can use the Query Database shape, set the SqlType property to StoredProcedure. the above shape would set the $ProjectName custom attribute.

Below is the start of the create script for the stored procedure,

CREATE PROCEDURE [dbo].[spGetProject]
@ProjectId int
, @ProjectName varchar(50) output


Below is the sql to call the stored procedure for testing,

declare @pn varchar(50)
exec spgetproject @projectid=320, @projectname=@pn out
select @pn

No comments: