none
how to save all data from datagridview to access database RRS feed

  • Question

  • Hi, I have a datagridview that I fill with diferent info, like products, price and other. And several rows

    I want to save it to an access database....
    I have no idea where to start 
    please help
    jeudi 22 octobre 2020 17:56

Toutes les réponses

  • Hello,

    There are several ways to interact with data in a DataGridView.

    1. Use a DataAdapter, for MS-Access see OleDbDataAdapter.
    2. Using a TableAdapter, will appear the least complex but unless you read up on them they can be difficult. The following might be of assistance, one of my code repositories.
    3. Do updates of any kind like inside of MS-Access, requires a decent amount of code, more for a intermediate coder.

    I've done a lot with MS-Access in the past and would generally use option 3 which will take time to get up to speed for someone who is new to this type of coding.

    I have a bunch of code samples were none focus exactly on your task but might assist in other areas of working with Access.

    In closing, the above is what I have to offer, nothing more, nothing less.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    jeudi 22 octobre 2020 22:09
    Modérateur
  • Hi juanlynn85,

    >>I want to save it to an access database....

    You can use OleDbDataAdapter to fill DataGirdView, and then use OleDbCommandBuilder to update the data and save into the Access DataBase.

    Check the following reference.

    how to save all data from datagridview to access database vb net

    Besides, if you need further assistance, please let me know.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    mardi 27 octobre 2020 08:11
    Modérateur