Designer Lists Action Stored Procedure

Posts   
 
    
Marcus avatar
Marcus
User
Posts: 747
Joined: 23-Apr-2004
# Posted on: 14-Nov-2004 11:38:57   

Frans,

The following SP is being listed in the Designer as an Action Stored Procedure when I want to retrieve the the records selected by it... confused

Any ideas what to do?

Marcus


CREATE PROCEDURE [dbo].[blog_CombineBlogs] (
@BaseAddress varchar(1024)
)
AS
BEGIN

SET NOCOUNT ON

CREATE TABLE    #CombinedBlogs (
            ChannelTitle varchar (1024), 
            ItemLink varchar(2048),
            ItemCreator nvarchar(256),
            ItemTitle nvarchar(1024),
            ItemDesciption ntext,
            ItemDate DateTime)

INSERT INTO #CombinedBlogs 
SELECT  blog_Config.Title AS ChannelTitle,
        dbo.CreatePermaLink(blog_Content.ID, @BaseAddress, blog_Config.Application, blog_Content.DateAdded) AS ItemLink,
        blog_Config.Author AS ItemCreator, 
        blog_Content.Title AS ItemTitle, 
        blog_Content.Text AS ItemDescription,
        blog_Content.DateAdded AS ItemDate
FROM        blog_Content 
INNER JOIN  blog_Config 
ON      blog_Content.BlogID = blog_Config.BlogID
WHERE   (blog_Content.ParentID = - 1)

INSERT INTO #CombinedBlogs 
SELECT  dbo.blog_AggregatedBlog.ChannelTitle,
        dbo.blog_AggregatedBlogItem.ItemLink,
        dbo.blog_AggregatedBlogItem.ItemCreator,
        dbo.blog_AggregatedBlogItem.ItemTitle,
        dbo.blog_AggregatedBlogItem.ItemDescription,
        dbo.blog_AggregatedBlogItem.ItemDate
FROM        dbo.blog_AggregatedBlog
INNER JOIN  dbo.blog_AggregatedBlogItem 
ON      dbo.blog_AggregatedBlog.AggregatedBlogID = dbo.blog_AggregatedBlogItem.AggregatedBlogID

SET NOCOUNT OFF

SELECT * FROM #CombinedBlogs ORDER BY ItemDate DESC

DROP TABLE #CombinedBlogs

END
GO

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 14-Nov-2004 12:09:38   

That's caused by the temp table, which confuses SET FMTONLY ON;exec proc ;SET FMTONLY OFF;...

To fix this: go to the proc in the catalog explorer, click open its subnodes till you see #0 as subnode under Amount resultsets. Select it, and with the RMB you can then click on it and select the option to change that value to 1 or higher simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Marcus avatar
Marcus
User
Posts: 747
Joined: 23-Apr-2004
# Posted on: 14-Nov-2004 12:21:18   

Otis wrote:

To fix this: go to the proc in the catalog explorer, click open its subnodes till you see #0 as subnode under Amount resultsets. Select it, and with the RMB you can then click on it and select the option to change that value to 1 or higher simple_smile

The proc is listed under Action Stored Procedures and does not have an Amount Resultsets node... disappointed

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 14-Nov-2004 12:35:34   

That's the project explorer stuck_out_tongue_winking_eye You have to look in the catalog explorer simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Marcus avatar
Marcus
User
Posts: 747
Joined: 23-Apr-2004
# Posted on: 14-Nov-2004 12:41:42   

wink

Thanks Frans!