Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

TableAdapter (Insert/Update/Delete/etc) - VB.Net with MS Access Back-End

$
0
0

Hi,

I need help and advice. I have built my whole logical on a single form with multiple controls and used the Wizard to create my Data Source. However, I have opted not to use the Binding navigator, as the system holds thousands of records and numerous tables. To avoid coding the DataAdapter route, I chose the TableAdapter route to load all my tables on the Load Event.

I then use the TableAdapters to load comboboxes and use the Filter Method to retrieve specific data. The retrieval process work fine, but when I want to add a new record, I use the AddNew Method, this also works fine, but when I want to retrieve information about existing data, it still displays as if you are adding a new record, does not retrieve the selected record. To get around this problem, I used the TableAdapter.Fill method before the Filter/AddNew method and it works, but response is a bit slower.

How do I get around this problem?

I also want to update/insert/delete data using this method, because the UpdateAll method is what the system generates, I want to update/delete/insert when the user confirms the update/delete/insert.

I am assuming that TableAdapter.Update(DataSet.Table) will update an individual record... have not tried it yet, but when I use the same logic to Delete/Insert... problems.

Hope you can help me with these issues or advice me accordingly.

Thanks


Viewing all articles
Browse latest Browse all 2535

Trending Articles