Results 1 to 11 of 11

Thread: how to add delete or update record in access using vb10

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    10

    how to add delete or update record in access using vb10

    i am working on a project in vb10 i want simple code to add delete or update record in ms access by a click of button, please help me

  2. #2

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    10

    Re: how to add delete or update record in access using vb10

    i am new to vb please reply soon, i am attaching my project zip file
    Attached Files Attached Files

  3. #3
    Hyperactive Member
    Join Date
    Jul 2011
    Posts
    278

    Re: how to add delete or update record in access using vb10

    If you follow my VB tutorial link in my signature, there is a database connection section which should be what you're after.

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    10

    Re: how to add delete or update record in access using vb10

    i am very new to vbforum please tell me how to go to that link, please
    and thanks for your quick reply.

  5. #5
    Hyperactive Member
    Join Date
    Jul 2011
    Posts
    278

    Re: how to add delete or update record in access using vb10

    Click here

  6. #6

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    10

    Re: how to add delete or update record in access using vb10

    ok, i got it and reading this. this is very helpful. if i got my problem solved then reply soon or i will get more help from you. thanks again.

  7. #7
    Hyperactive Member
    Join Date
    Jul 2011
    Posts
    278

    Re: how to add delete or update record in access using vb10

    I'd recommend finding some time and sitting down through the entire tutorial, it'll really benefit you.

  8. #8

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    10

    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.

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: how to add delete or update record in access using vb10

    Quote Originally Posted by MKRBHAGWAN View Post
    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.

  10. #10
    Junior Member
    Join Date
    Feb 2012
    Posts
    26

    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.

  11. #11
    Junior Member
    Join Date
    Feb 2012
    Posts
    26

    Re: how to add delete or update record in access using vb10

    BTW, I went back through the tutorial and everything works as advertised. Thanks again! Great resource...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width