How to cleanly update database from Datagridview?

I am trying to update two different tables in an access database using a form?

  • What I have are two different tables. One called Names with two fields (NameID and Name) and the other called Nation with three fields (NationID, NameID and Nation). I dont know why they are split like this but they are and I am not allowed to change them. I have a form with two txt fields (one for name and one for nationality). When I hit the submit button I would like for the name which is in the text field to populate in the Names table and the Nationality to populate in the Nation table with the corresponding NameID. What I am trying to accomplish now is to just update the Names table with the name in the text box. Once I get that down I can manage getting the Nation table updated. My problem is that I dont even know how to begin to create a connection to the database and query the database to update the table. It is pretty simple but I just do not know where to begin. By the way, I am trying to write a VB code using the 'Build Event' feature on my Submit button.

  • Answer:

    It is not clear to me - are you using Access only or are you connecting to Access through VB.net or VB6?

Chris P at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.