RE: junction tables: how to insert data



After inserting the record into the first table (questionnaire) read the
value of the field with AutoIncrement and pass this value to the junction
table.

"Gigino" wrote:

> I've a many to many relation using a junction table.
> I have 3 tables: questionaire, questions and a junction table; i want to add
> a row to the first table(questionaire name), some record in questions table
> and the record to make the junction on the junction table. i have to do this
> without using user interface, only programming(the data are in variables). I
> can add the row on the first table but i don't know the record "Id" because
> the "Id" field is Auto-increment so i don't know what value to insert in the
> junction table as Questionaire id. the same problem is the one i find for
> questions table and junction table. Do you have some solution?
> Sorry for bad english(i'm italian)
.