Results 1 to 2 of 2

Thread: [2005] how to insert Data to a access Database (Multiple table)?

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    59

    [2005] how to insert Data to a access Database (Multiple table)?

    hi all:
    how to insert Data to a access Database (Multiple table)?

    my access database have a multiple table t1,t2,t3
    and i want text1,text2,text3 insert to t1 table
    and text1,text2,text3,text4,text5 insert to t2 table
    and text1,text2,text3,text4,text5,text6,text7 insert to t3 table
    how to do this?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] how to insert Data to a access Database (Multiple table)?

    Q. How do you take a step?
    A. You put one foot in front of the other.

    Q. How do you take multiple steps?
    A. You put one foot in front of the other multiple times.

    Inserting data to three tables is just like inserting data into one table except you do it three times. The one thing to be aware of is that if the tables are related then you must insert the parent row before inserting the child row.

    See this thread for examples of data access scenarios. The last code snippet will be of most interest to you. Make sure you read the post and don't just copy and paste and expect it to work. The code is an example only and will require some modification to work for you.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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