Hi

I'm new to databases under vb.net although I've used them extensivley under VB6.

I have a main form with a DataGridView on it. Thats connected to the following bits- _TWC_Viewer_SubmissionsDataSet, ViewerDataBindingSource, ViewerDataTableAdapterm and TableAdapterManager. All this was etup by the VB wizard. The database table is named ViewerData.
This all does it job very nicely.

Secondly, I have another form which is setup so that when you click on a main form record line it opens up the second form for in depth record editing.
The second form is a bunch of text boxes ect to represent each field.
This form has its own set of database bits- _TWC_Viewer_SubmissionsDataSet, ViewerDataBindingSource, ViewerDataTableAdapter, TableAdapterManager and ViewerDataBindingNavigator.
This form also works fine and does what it should.

The problem is with a 3rd area. Its all in code and creates its own temporary dataset. After its done its job, its saves its results back into the database which also works ok.
However, the changes in teh database are not being reflected back to the controls on either form. If I kill the app and restart it then the updates are in the database so its just a form updating problem.
ZIn the code I have tried things like - formMain.TableAdapterManager.UpdateAll(formMain._TWC_Viewer_SubmissionsDataSet) and formMain.DataGridView1.Update() without luck.

So whats the correct way of telling all the datasets etc to do an update after something has changed?


Greatly appreciate as this is doing my head. Especially as I have sorted out so much on my own and just run out of knowledge.

Thanks
malcom

Recommended Answers

All 2 Replies

>MDB database updateing from two forms?

In this situation you need to write some code by hand. Don't rely on typed dataset.

>MDB database updateing from two forms?

In this situation you need to write some code by hand. Don't rely on typed dataset.

Would anyone have some generic code to get me started on replacing these components with code?
I'm using an Access database. Googled a lot but so far I can't find anything that suits.

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.