468,316 Members | 2,143 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

Where do I place a stored procedure?

24
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.
Jan 17 '09 #1
2 1386
ck9663
2,878 Expert 2GB
Now that you have the SP, you have to create that inside your DB. How you will call it from your front-end depends on your application tool.

-- CK
Jan 18 '09 #2
uicouic
24
Oh ok I'll take that in mind.

Thanks ck9663.

Cheers! :)
Jan 19 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Michael Trosen | last post: by
4 posts views Thread by Rhino | last post: by
8 posts views Thread by Thomasb | last post: by
3 posts views Thread by kd | last post: by
9 posts views Thread by fniles | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.