Results 1 to 5 of 5

Thread: Stored procedures

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Posts
    27

    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??

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    You can point a dataadaptor to a stored procedure, as long as its public.

  3. #3
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    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).

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Post the code of your stored procedure, and I will show you how to call it.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Posts
    27

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width