Action Stored Procedure returning OUTPUT parameter

Posts   
 
    
DrM
User
Posts: 49
Joined: 09-Feb-2004
# Posted on: 28-May-2005 11:25:56   

Is there anything special I need to know about using an Action Stored Procedure returning an OUTPUT parameter.

I'm calling this from my code:

ActionProcedures.User_Authenticate(username, password, Authenticated, UserID)

and the Authenticated and UserID are not being passed back.

Here is my sp defn:

ALTER Procedure User_Authenticate

@UserName varchar(50), @Password char(50), @Authenticated tinyint OUTPUT, @UserID int OUTPUT

As

....

Any ideas?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 28-May-2005 11:57:31   

You pass in the output parameters as ref parameters, thus:


byte Authenticated=0;
int UserID = 0;
ActionProcedures.User_Authenticate(username, password, ref Authenticated, ref UserID)

and after the call, Authenticated and UserID have to have the value. If your parameters aren't 'ref' defined (and it seems like it), please check if the parameters are indeed seen as output parameters in the LLBLGen Pro designer, (open the proc call in the sp proc call editor)

Frans Bouma | Lead developer LLBLGen Pro