error with access database

  • 14 years ago

    when trying to add data from my form to an access database i got this error

    An unhandled exception of type 'System.Exception' occurred in system.windows.forms.dll

    Additional information: DataBinding could not find a row in the list that is suitable for all bindings


    here is the code i have in my "add" button

    Private

    Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click

    validatedata()

    Me.BindingContext(Dstraining, "training").EndCurrentEdit()

    Me.BindingContext(Dstraining, "training").AddNew()

    Me.navigation_PositionChanged()

    end sub

    what did i do wrong?first  it was adding null values to the database and now i am getting an error

    i have two listbox  a combobox  and a datagrid on the form which are all binded to the access database which consists of only one table

     

     

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are 10 types of people in the world, those who can read binary, and those who can't.”