How to insert records in related tables

jeboy

Member
Joined
Nov 19, 2006
Messages
21
Programming Experience
Beginner
Good day, I would like to ask if how am i going to insert record in 2 related tables in ms access database with vb.net?

Thank you,
 
How do I insert data to multiple related tables

How can I insert data to multiple related tables in access database using vb.net? For example, I have two tables that are related to each other namely:
1. Group table
2. Member table
all members in Member Table are belong to a specific group in Group Table.

thank you very much
 
Access can, i recall, update a join view quite easily:

VB.NET:
UPDATE
  (SELECT * FROM a INNER JOIN b ON a.id = b.id)
SET
  col = value

I dont know what happens if you insufficiently specify the query such that is is (partially) cartesian - i.e. if more than one row if b is matched to a.. there would necessarily be a puzzle of what value gets written to b. My advice is not to write a cartesian query
 
Back
Top