tags:

views:

45

answers:

0

I am doing some activity that will update two tables. One of the tables have an autoid which I need inserted in the other table. The field that stores the autoid value is used a like a foreign key to different tables depending on context.

When updating I face the problem that the autoinc Id does not have a value until its saved.

i have thought of having separate datacontexts for the two tables doing submit on one before the other but the I guess it will be very slow submitting for each row.

What are my options here, I guess I cannot have the foreign key to multiple tables as that would solve the problem ??

Martin