How do I use my custom Stored Proc to insert into a Dataset

Posted on 2009-04-29
Last Modified: 2012-05-06
I am using Visual Studio 2008 and my project is in VB.
The trouble I have run into involves a particular child table that is used for attendance. I wish a new record to be inserted with a stored proc that also updates a parent table that uses a calculated field to update the number of lessons attended and lessons remaining.

My question is how do I get the TableAdapterManager, or the TableAdapter to use my stored procedure? It needs a primary key parameter that is displayed on the parent datagridview. The error message is:

 "Procedure or function 'hott_InsertRecordedLesson' expects parameter '@RegID', which was not supplied. "

How do I get this parameter into the Stored Proc that I wish the tableadapter to use?
Question by:wdarnellg
    LVL 11

    Expert Comment

    You can specify the parameters for the stored proc while defining it,
    LVL 83

    Expert Comment


    Accepted Solution

    Thanks everyone, but I found the exact answer on msdn's HOW DO I video series:

    I would like to close this question, but I will have others soon I am sure.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now