Question Data didn't update in the database

zhtway

New member
Joined
May 12, 2010
Messages
2
Programming Experience
Beginner
Hi,

I am testing to insert a record to the table from the form by button click event.
Data was temporarily hard-coded for testing.
There is data grid view opened on the form as well.
When the button is clicked, the data was inserted in the data-grid.
But after exit out, I don't see in the table.
When I run the program, I don't see in the data grid view as well.
Here is the code from button click event and please advice me...

VB.NET:
        Dim newCustomerRow As CustomerLookupDS.CustomerRow
        newCustomerRow = CustomerLookupDS.Customer.NewCustomerRow()

        newCustomerRow.CustomerID = 123
        newCustomerRow.CustomerName = "Alfreds Futterkiste"
        newCustomerRow.RouteID = 1
        CustomerLookupDS.Customer.Rows.Add(newCustomerRow)
        Me.CustomerBindingSource.EndEdit()
        Me.CustomerTableAdapter.Update(CustomerLookupDS)

Thanks
Heathcliff
 
Here is the project zip file

Hi,

Here is the project I am working.

Thanks
 

Attachments

  • test.zip
    47.1 KB · Views: 18
Last edited by a moderator:
Back
Top