Adapter.Update not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shef
    New Member
    • Jun 2007
    • 1

    Adapter.Update not working

    Hi,

    I'm trying to build a database application in Visual Studio 2005 express Edition. Using Visual Basic, and a sample Access database, I created a new Windows Application, added a database, created a table, and then used the Configure Dataset wizard to create a tableset with the new table Table 1.

    I dragged the tableset into the form, and Visual Studio 2005 created all the links, adapter, binging and dataset. But the problem is, the Save button in the Binding Navigator control doesn't work. It doesn't give an error, but when I close
    the form and open the table to view its data, I can't find the newly entered
    data.

    I tried it on a windows XP machine and a Vista installed one, same issue.

    Any ideas why it is not saving?

    Thanks very much.
    Shef


    Here is the code for the form;
    =============== =============== ========

    Public Class Form1

    Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
    'TODO: This line of code loads data into the 'NwindDataSet1. Categories' table. You can move, or remove it, as needed.
    Me.CategoriesTa bleAdapter.Fill (Me.NwindDataSe t1.Categories)


    End Sub

    Private Sub CategoriesBindi ngNavigatorSave Item_Click(ByVa l sender As System.Object, ByVal e As System.EventArg s)
    Me.Validate()
    Me.CategoriesBi ndingSource.End Edit()
    Me.CategoriesTa bleAdapter.Upda te(Me.NwindData Set1.Categories )

    End Sub

    Private Sub CategoriesBindi ngNavigatorSave Item_Click_1(By Val sender As System.Object, ByVal e As System.EventArg s) Handles

    CategoriesBindi ngNavigatorSave Item.Click
    Me.Validate()
    Me.CategoriesBi ndingSource.End Edit()
    Me.CategoriesTa bleAdapter.Upda te(Me.NwindData Set1.Categories )

    End Sub
    End Class
Working...