I got a database with 2 tables.
Table 1 is saving personal information
Table 2 is saving dates, Time and a number

In table 1 there is a date, time, number textbox.
Which also is in Table 2.
But Table 2 has some other fields which contain other data.
Basically 3 textboxes which are on my form are saved in table1 and table2.
At least they are supposed to.

My problem is, even though i am telling it to save.
It's not saving to my 2nd table.
It does fill them in while in runtime, but it does not save.
Once i go out of runtime and restart or check my database.
I can tell its not being saved.
Table1 has its new data, but table2 remains empty.

I tried on a empty form by dragging bother tables datagrid to it.
And i notice you will only get 1 Bindingnavigator.
Which i am guessing is the reason why only the one with the bindingnavigator will save.
And the other one wont save.

Is there something special you have to do in this kinda of instance?
I tried manualy adding a 2nd bindingnavigator giving it all the correct info.
But it still wont save to the 2nd table.

This is what i got as code to save it.

            Afspraken.PatientsBindingSource.EndEdit()
            Afspraken.CalendarBindingSource.EndEdit()
            Afspraken.TableAdapterManager.UpdateAll(Afspraken.EidafsprakenDataSet)

Patients will be saved, calendar wont.

Can we see a bit more of your code?

Where are you specifying the Update commands for instance? - You will need more than one as you are updating two tables within your dataset.

Ok i guess thats the reason why only 1 table is being saved.
There is no other update command right now.
Both tables are supposed to be updated/saved at the same time.

I assumed Afspraken.TableAdapterManager.UpdateAll(Afspraken.EidafsprakenDataSet)
Would update all tables.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.