On Nov 8, 2007 11:33 AM, Oleg Broytmann <phd@phd.pp.ru> wrote:
On Thu, Nov 08, 2007 at 11:29:01AM +0100, Petr Jake?? wrote:
> Anyway I thing I have to catch the idSequence which is used as a primary key
> in the master tabel record (row)  because I need to insert this value to the
> detail table(s) as foreign key(s). Or am I missing or overlooking something?

  After the row has been inserted into the master table the generated
value becomes its ID, so you only need to get .id and use it as the foreign
key.
 
Yes,  I can imagine your scenario when I am writng the master record and I do not know detail record(s) values. When I know both, master record values AND detail record(s) values in the time of inserting master record, I thing it is "less expensive" to have id in the memory and use it this way, than "get .id" for each detail record.

But anyway, thank your very much for showing me (and I hope others in this list as well) which way to go.

Petr Jakes



Oleg.
--
    Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
          Programmers don't die, they just GOSUB without RETURN.



--
Ing. Petr Jakeš
TPC spol. s r.o.
Průmyslová 1137
506 01  Jičín
Czech republic, Europe
www.tpc.cz
mobile: +420-777-172450