Does this count as a Retrieval SPROC?

Posts   
 
    
hchattaway
User
Posts: 38
Joined: 06-Apr-2006
# Posted on: 12-Oct-2007 02:20:17   

Hello

In my SPROC, I create a temp cursor and then fill it with values from a regular table using an INSERT/SELECT statement. The last statement of the SPROC then does a SELECT * FROM #TEMP to create the final result set.

I need this returned to my app, but LLBLGEN is not picking this up as a "retrieval" procedure, but as an "action" procedure.

What can be done?

Thanks Harold

Anonymous
User
Posts: 0
Joined: 11-Nov-2006
# Posted on: 12-Oct-2007 02:54:23   

Hi there,

Does your stored proc definately run successfully? I ran into the same problem the other day and it was because my stored proc had an error. Once I fixed it, it showed as a retrieval procedure as expected.

Cheers,

Pete

hchattaway
User
Posts: 38
Joined: 06-Apr-2006
# Posted on: 12-Oct-2007 03:17:55   

Yes, it runs successfully. I can run it from Visual Studio and SQL Server MS and get the correct result set.

Here is the code:



ALTER PROCEDURE [dbo].[App_ReportFormValues] 
    (
    @PortalType int = 2
    )
AS
BEGIN
    /*
       This SPROC creates and fills a table that will be used to hold the report values that are 
       created by ReportingFields_GridView.ascx
    */
    SET NOCOUNT ON 
    
    create table #ReportFormValues (colID int, colName nchar(20), colOrd int, sortOrd int, operator char(5), 
           compare1 nvarchar(50), compare2 nvarchar(50), datatype char(10), 
           hasrange bit, retmulti bit, fromexp varchar(200), fielddef varchar(200))
    
    /* Prime table with metadata */ 
    insert into #ReportFormValues (colID, colName, datatype, hasrange, retmulti, fromexp, fielddef)
       select colid, colName, datatype, hasrange, retmulti, fromexp, fielddef
         from App_ReportingFields where portaltype = @PortalType
        
    select * from #ReportFormValues
    
END


Should be a retrieval type procedure to me!

Thanks Harold

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 12-Oct-2007 11:25:37