Hi
I think I'm just after advice on best practice with this!
I have a database which has 2 tables. The first table has ID, Name, Address and the second table has ID and JobType.
Table 02 can list multiple types of JobType so we could have
Table01:
1. D Smith. Address01
2. S.Jones. Address02
Table02
1. Accounts
1. Sales Ledger
1. Chartered Accountant
2. IT
2. Web Design
2. Graphic Design
2. 1st line support
A join gets them together and all works perfectly.
However, the content will be updated when some one fills in a web form. Do get the form to send results to both tables, I assume I have to open the database twice or can I open it once and open each table one at a time? I know I could practice this and not ask the question but I am interested to know what is the most efficient way.
I would also need to know what ID to use. So when I populate Table02 it uses the correct ID from Table01. At the moment Table01 ID field is incremented automatically. Would you suggest I always assign the ID myself, or would I need to query the database, find out what ID number is currently in use and then increment it by 1 and assign the new number to an ID variable which then populates the Table's Field? In which case, am I opening the database again or trying to perform all 2/3 stages in one go?
Thanks
Dave