-
Stored procedures
I have never used these before and have got stuck .I have created a test stored procedure but I do not know how to exucutr it from within vb.net. I need to pass a value in and then return a value. Can somebody give me some pointer in how to do this??
-
You can point a dataadaptor to a stored procedure, as long as its public.
-
I haven't tried it, but the help seems pretty good. Search your built-in help for "Using Stored Procedures with a Command" (without the quotes).
-
Post the code of your stored procedure, and I will show you how to call it.
-
stored procedure code
This is not for anything I want to do it is just an example I have used to make myself familier with the format of these and how to use them. If you could show me how to call this and get the result returned I will be able to do what I need with the stored procedures I need to write for my project.
CREATE PROCEDURE Average
@score1 smallint,
@score2 smallint,
@score3 smallint,
@score4 smallint,
@score5 smallint,
@myAvg smallint
AS SELECT @myAvg = (@score1 + @score2 + @score3 + @score4 + @score5) / 5
RETURN @myAvg