(Procs below)
I wrote a custom stored proc for the framework and I needed (thought I needed) an extra field in the result set. I added it to the database and did a gen. As expected, the method returns a dataset.
I later realized that none of the apps invoking the method required the extra field, so I thought it would be better to return a TList. So I made sure the Custom proc returned the same columns as the generated procs. I deleted the mapping.config file altogether and regenned. The method created still returns a Dataset instead of a TList of ShowCategories.
Please let me know what I'm doing wrong here.
Thanks
Paul
.netTiers proc:
CREATE PROCEDURE dbo.ShowCategory_Get_List
AS
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SELECT
[ShowCategoryID], [DivId], [Title], [Sort], [Grid], [SessionID], [RowVer]
FROM
[dbo].[ShowCategory]
SELECT @@ROWCOUNT
GO
GRANT EXEC ON dbo.ShowCategory_Get_List TO B2BUser,B2BUser
GO
Custom Proc:
CREATE proc dbo.cstm_showcategory_SelectHavingScreeners
@DivID INT,
@UserID INT,
@Active BIT
as
DECLARE @date smalldatetime
SET @date = dbo.ufFormatDate(getdate())
DECLARE @permissionLevel Int
SET @permissionLevel = dbo.ufScreenerPermissionLevelForUser(@userId, @date)
DECLARE @userIsAdmin Int
SET @userIsAdmin=dbo.ufIsAdmin(@divid, @userid)
IF @userIsAdmin = 1
SELECT DISTINCT sc.ShowCategoryID, sc.DivId, sc.Title, sc.Sort, sc.Grid, sc.SessionID,
sc.RowVer
FROM ShowCategory sc
INNER JOIN Show s ON s.ShowCategoryID = sc.ShowCategoryID
INNER JOIN ScreenerXShow sxs on sxs.ShowID = s.ShowID
INNER JOIN Screener scr ON scr.screenerID = sxs.ScreenerID
WHERE s.DivID = @DivID AND scr.Active = @Active
ORDER BY sc.Sort, sc.Title
ELSE
SELECT DISTINCT sc.ShowCategoryID, sc.DivId, sc.Title, sc.Sort, sc.Grid, sc.SessionID, sc.RowVer
FROM ShowCategory sc
INNER JOIN Show s ON s.ShowCategoryID = sc.ShowCategoryID
INNER JOIN ScreenerXShow sxs on sxs.ShowID = s.ShowID
INNER JOIN Screener scr ON scr.screenerID = sxs.ScreenerID
INNER JOIN dbo.ufAllShowsForUser(@divid, @userid, @date, 1) ufShows on ufShows.showid = sxs.ShowID
WHERE s.DivID = @DivID
AND scr.Active = @Active
AND scr.PermissionLevel <= @permissionLevel
ORDER BY sc.Sort, sc.Title
SELECT @@ROWCOUNT
go
grant execute on dbo.cstm_showcategory_SelectHavingScreeners to b2brole
go