Hello ML,
Thanks for the reply. May be I am using them in the back ground . All
I do is use controls in the front to get the job done. But I never had
a situation or need to customize these controls and hence had to look
into the aspnetdb database where to make changes inorder to accomplish
my task.
Like I said this is my first time that I have a need to grab the
UserId and push that into another table along with the DelaerShipID. So
I just needed some suggestions on how do I do it.
As a test I Executed the stored proce aspnet_Users_CreateUser and it
returns the @.UserId value here is the output from the Management
Studio...
****************************************
*********************
USE [aspnetdbTest]
GO
DECLARE @.return_value int,
@.UserId uniqueidentifier
EXEC @.return_value = [dbo].[aspnet_Users_CreateUser]
@.ApplicationId = '8203a4f9-995b-4506-aec0-075551d77d02',
@.UserName = N'TestUser',
@.IsUserAnonymous = false,
@.LastActivityDate = N'4/11/2006',
@.UserId = @.UserId OUTPUT
SELECT @.UserId as N'@.UserId'
SELECT 'Return Value' = @.return_value
GO
****************************************
***********************
and the output I got is the @.UserID
'303B2D60-788C-4F96-9930-7E5BA173D165'.
Now my question is :
To get this @.UserID value from the aspnetdb to my Business Layer what
event do I need to use in my code behind page?
Thanks
-LI'm sorry if I sounded harsh. There were no ulterior motives.
You'd better ask this in a more appropriate news group (depending on the
programming language used in your asp code-behind). Basically, you need to
trap the value being returned from the procedure in a local variable in your
asp method by invoking the SQL procedure appropriately. You need to declare
the UserId parameter as an output parameter and assign its value to the loca
l
variable. (Yes, it's obvious that I'm more at home in T-SQL.)
ML
http://milambda.blogspot.com/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment