Re: how to add delete or update record in access using vb10
this really help me a lot much. but not fully solved my problem. this will update records and show when i restart project i want records to be updated without closing project. please reply soon.
Re: how to add delete or update record in access using vb10
Originally Posted by MKRBHAGWAN
this really help me a lot much. but not fully solved my problem. this will update records and show when i restart project i want records to be updated without closing project. please reply soon.
If you aren't seeing changes until you restart then you're doing it wrong. You should be editing the local data first, before saving anything to the database. The sequence of events should basically be like this:
1. Use a DataAdapter to retrieve data from the database and populate a DataTable.
2. Display that data in your application if appropriate, by binding the DataTable to a DataGridView or other controls.
3. Edit the data contained in the DataTable, either in code or by the user through the UI.
4. Use the same DataAdapter to save the changes from the DataTable back to the database.
As you can see, what you're asking for is already accomplished in step 3, before any changes are saved to the database in step 4. I don't know what's in OhGreen's tute but I can tell you that if you follow the CodeBank link in my signature and check out my thread on Retrieving & Saving Data, which includes two examples of using a DataAdapter.
Re: how to add delete or update record in access using vb10
OhGreen,
I have gone through a lot of the tut, but have run into some problems associated with the question in this thread. You can see my post here. It is directly related to adding or updating records in a database from your tut.
Not to hijack thread, but it seems like we are having similar needs and issues.