G
Guest
I need to add and save a new record to 2 tables related by the field
CompanyID using SQL. CompanyID is an auto-number (and increments) in Table1
but not in Table2. I can add a new record to Table1 but not sure how to save
the same information (CompanyID) to Table2.
Since CompanyID is an auto-number in Table1, should I get the last CompanyID
in Table1, and assume that the next CompanyID will automatically equal to
last CompanyID incrementing 1? Will this cause any conflict should 2 users
open a new record at the same time?
What's the best way to do this? Thanks in advance for your help.
CompanyID using SQL. CompanyID is an auto-number (and increments) in Table1
but not in Table2. I can add a new record to Table1 but not sure how to save
the same information (CompanyID) to Table2.
Since CompanyID is an auto-number in Table1, should I get the last CompanyID
in Table1, and assume that the next CompanyID will automatically equal to
last CompanyID incrementing 1? Will this cause any conflict should 2 users
open a new record at the same time?
What's the best way to do this? Thanks in advance for your help.