Click here to Skip to main content
15,887,327 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i want to update any selected Table (*.Mdb File).
I am working on it in C#,wat i need Actually is when i click on open in my form it will open a dialouge box to Browse And Open Only Mdb files. i that form i kept one ComboBox Which Shows The Number Of tables Present in that particular Access Files ,if we Click on Any table it will open And will Show it on a dataGrid.

Wat i need is if We made Any Changes In the Slected Data in our DataGrid It should Reflect On the Main DataBase,Can AnyOne Help Me???????



P.Rupesh
rupesh.prince@gmail.com
Posted

As you should have the table name available you should be able to dynamically construct the insert/update/and delete statements. Additionally, if you used a dataadaptor to fill the dataset for the grid, that dataadaptor can generate insert/update/and delete statements from the select statement used.

However, if I may point out, what is the point of recreating the Access default Application functionality for opening, mdb files, and editing the data in a grid?
 
Share this answer
 
yup, you can use DataTable and dataAdapter as our friend said in last post.

use it like DataAdapter.Update(DataTable);

let us know more about your code if you want us to provide better support. how did you fill the datagrid? do you use an adapter? etc...


---------------------
Regards

H.Maadani
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900