Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem in database using VB 2010

Status
Not open for further replies.

emperror123

Member level 5
Joined
Dec 11, 2010
Messages
86
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,880
dear all

i have do the database but when i debug it, it come out this error which is
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.

i have search many article from google, i still unable to solve it, below are my coding hopefully you all may help me

Code:
       If btnSave.Text = "Save" Then
            '   DateDonatedDateTimePicker.Text = Today
            If SuccessCheckBox.Checked = True Then
                RemarkTextBox.Text = "No Remark"
            End If
            Me.Validate()
            Me.DonorStatusBindingSource.EndEdit()
            frmBlood.DonorInfoBindingSource.EndEdit()
           [SIZE=4] [COLOR=yellow]Me.TableAdapterManager.UpdateAll(Me.PatientDataSet)[/COLOR][/SIZE]
            Me.DataGridView1.DataSource = Me.PatientDataSet.DonorStatus.Select("IC='" & Me.ICTextBox.Text & "'")
            btnCancel.Text = "Back"
            btnSave.Enabled = False
        ElseIf btnSave.Text = "Add" Then
            Me.DonorStatusBindingSource.EndEdit()
            Me.DonorStatusBindingSource.AddNew()
            Me.ICTextBox.Text = frmBlood.txtIC.Text()
            btnSave.Text = "Save"
            btnCancel.Text = "Cancel"
        End If

the yellow highlight is the one place that error occur
 

i offer u to use Linq... easy to use and powerful

put ur project here if its possible.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top