CREATE PROCEDURE procCreateBasket
@.ShopperID int,
@.BasketID int OUTPUT
AS
INSERT INTO Basket(ShopperID)
VALUES (@.ShopperID)
SELECT @.BasketID = @.@.IDENTITY
I don't want to use this as a stored procedure I want to convert it as a string an use in that way in my asp.net application how can I do that?
Simply just take out the procedure declaration. For example, your string will be everything after the AS keyword.|||Adding to what master4eva said, you should be using SCOPE_IDENTITY()instead of @.@.IDENTITY. The former returns a more accurate value of theId just inserted as compared to @.@.IDENTITY. Check out books on line for more info.
No comments:
Post a Comment