Call a Stored Procedure
I have this stored procedure here and i want to call it so that i can insert data into SQL Sever tables.
Could someone gimme an example thru code.Here is my stored procedure:
create procedure sp_SaveNewSubCat(@SubCatName as varchar(50), @CatName as varchar(50))
as
declare @CatId as Integer
Set @CatId = (select catid from category where categoryname=@CatName)
Insert into subcategory(subcategoryname,catid) values(@SubCatName,@CatId)
--------------------------------------------
Thankyou
|