Problem saving record using Validate/EndEdit

Posted on 2009-04-16
Last Modified: 2012-05-06
I'm trying to do something as simple as save a record bound to a dataset. This should be easier....

I'm getting the following error:

"Update requires a valid UpdateCommand when passed DataRow collection with modified rows."

Highlighting this line:

If Not Me.PendingTableAdapter.Update(Me.Phone_memo_backendDataSet.Pending) > 0 _

Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click



        If Not Me.PendingTableAdapter.Update(Me.Phone_memo_backendDataSet.Pending) > 0 _


            MsgBox("No records were updated.")

        End If


    End Sub

Open in new window

Question by:c9k9h
    LVL 83

    Expert Comment

    The dataadapter is not configured properly. It is missing the update command. How did you create the dataadapter and the binder etc?

    Author Comment

    I did not use a wizard or anything....

    This will be in a multi-user enviro. Will it be better to use standard SQL to perform the updates? I Know Access Jet has many issues with multiple users...
    LVL 83

    Accepted Solution

    Access is mostly used in single user environments. If you did not use a wizard, you would have to create the other commands yourself. Use the commandbuilder class to generate other commands.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    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 …
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    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…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    754 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