Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Datagrid - dataadapter and update

pavlospapavlospa Member Posts: 7
I use an OleDbDataAdapter to access a database, then I retrieve data from the database from 3 different tables in a single query and finally a dataview to connect the results to a datagrid. After processing data in the grid, delete - edit, i want to send the changes back to the database using the Update method. As the CommandBuilder cannot be used, as the original data comes from 3 different tables i tried to write the commands that the dataadapter needs.
The problem that i have is that i'm unable to give the required parameters for the commands. For example, a Delete command "DELETE * FROM table WHERE fieldID = ?". If I delete 2 rows from the grid the delete command doesn't "know" which field gives the ID.
Any help or a link to an example would be greatly appreciated.

Comments

  • paulmorrisonpaulmorrison Member Posts: 127
    The Microsoft Press book, "Programming Microsoft Visual Basic.Net for Microsoft Access Databases" may be able to help. There are also a couple of fair examples on Microsoft's web site.
    : I use an OleDbDataAdapter to access a database, then I retrieve data from the database from 3 different tables in a single query and finally a dataview to connect the results to a datagrid. After processing data in the grid, delete - edit, i want to send the changes back to the database using the Update method. As the CommandBuilder cannot be used, as the original data comes from 3 different tables i tried to write the commands that the dataadapter needs.
    : The problem that i have is that i'm unable to give the required parameters for the commands. For example, a Delete command "DELETE * FROM table WHERE fieldID = ?". If I delete 2 rows from the grid the delete command doesn't "know" which field gives the ID.
    : Any help or a link to an example would be greatly appreciated.
    :

Sign In or Register to comment.