DataSet Bug

  • Thread starter Thread starter Rakshithc
  • Start date Start date
R

Rakshithc

Guest
previously I have created one project with .mdf file failed to make display in Listbox...
but same I failed in Make changes in dataset..

code is below

Public Class Form1
Private Sub ReportBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles ReportBindingNavigatorSaveItem.Click
Me.Validate()
Me.ReportBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.StReportDataSet)

End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
TODO: This line of code loads data into the StReportDataSet.Report table. You can move, or remove it, as needed.
Me.ReportTableAdapter.Fill(Me.StReportDataSet.Report)

End Sub

Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Me.ReportBindingSource.EndEdit()
Me.ReportTableAdapter.Update(Me.StReportDataSet.Report)
End Sub
End Class



I made form1 closing code to save the changed data in data set. ..

Table pic

dbdd87f1c4c4d9f7536bdc15d4b79d29._.jpg


Dataset interface

49ae747163983edcd6e8799603f05434._.jpg


After Run the program

cbda3babedf4981b3e85d9681be6cd5c._.jpg


I made changes by input 5 Row..and clicked save then close. .

Data is same as previous

973b7fc7f81d82450959564547ae4019._.jpg


Then how to do save and update the data?

Continue reading...
 
Back
Top