Advertisement

06.27.2008 at 12:55PM PDT, ID: 23522846
[x]
Attachment Details

error trying to save multiple new records in VB.net windows app using VS 2008

Asked by PACCAST-DEV in Microsoft Visual Basic.Net, .Net Editors & IDEs, Visual Studio 2008

When I save a new record in my app all works well for the first new record. Any subsequent records I try to add give me this error:
update requires a valid updatecommand when passed datarow collection with modified rows

here is my code:

   Private Sub SaveNewRecord()
        Try
            FurnacePartPoursBindingSource.Current("item") = Me.cboItems.Text
            FurnacePartPoursBindingSource.Current("Entry Number") = NewKeyValue
            FurnacePartPoursBindingSource.Current("Operator") = cboOperator.SelectedValue
            Me.Validate()
            Me.FurnacePartPoursBindingSource.EndEdit()

            If Me.PctDataSet.HasErrors Then
                    ...
                Exit Sub
            Else
                Me.FurnacePartPoursTableAdapter.Update(Me.PctDataSet.FurnacePartPours) ' error occurs here
            End If

end sub

Thanks, bmutchStart Free Trial
[+][-]06.28.2008 at 04:52PM PDT, ID: 21892423

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.29.2008 at 09:11PM PDT, ID: 21896560

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 12:24PM PDT, ID: 21919740

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 02:04PM PDT, ID: 21929046

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, .Net Editors & IDEs, Visual Studio 2008
Sign Up Now!
Solution Provided By: webtubbs
Participating Experts: 3
Solution Grade: A
 
 
[+][-]07.03.2008 at 02:54PM PDT, ID: 21929583

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 03:14PM PDT, ID: 21929785

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628