Hello all. Sorry if the question is an obvious one, but I have a stored procedure as follows:
[code]
CREATE PROCEDURE USPAddToyRecord
@strToyName varchar(50) ,
@strToyCode varchar(6) ,
@intToyId int out
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO tblToy (strToyNameTO,strToyCodeTO,) VALUES
(@strToyName,@strToyCode)
SELECT @intToyId = @@IDENTITY
END
[code]
I am required to use it for adding a record into the database (SQL Server Express). When I enter the details such as name and code into the form and click "Save", the corresponding id of the record added would be displayed in a label.
Where do I place the stored procedure then and how do I achieve the function above? Any advice/help appreciated. Thanks.