Advice please re simple data binding

bluep651

Member
Joined
Feb 16, 2009
Messages
7
Programming Experience
Beginner
I have an Access database with a single table, could be five thousand rows in it. The table has an autonumber field as the primary key as no other column lends itself to being a primary key. I would like to display all the rows in a datagridview and allow the user to add, edit and delete via the grid. It will always be a single user app. As each row in the grid is changed I want to post the changes for that row straight back to the database. I have looked at the DataAdapter but that seems to be designed for disconnected recordsets.

Whats the best way to achieve my requirements ?

TIA
 
Read the DW2 link in my signature, section "Creating a Simple Data App"

Call tableadapter.update() every time the bindingsource position changes. THis advice will make more sense after you have carried out the tutorial
 
Thanks for the link. Would I be right in thinking that the TableAdapter DBDirect methods are what I should be using ? In which case,
1 Does an update just update a single record or look at all rows to see which have changed?
2 Do I have to use the Data Configuration Wizard rather than creating everything in code ?
3 Presumably I can link the tableadapter methods to what the user does in a DataGridView ?

Many thanks
 

Latest posts

Back
Top