It works even better if you use single field LONG AutoInc primary key
on all the tables too. Making a meaningless single field primary key
allows you to sort out the complexities of duplicates after the fact.
For adding parent / children nest the child inserts in a loop of
parent inserts. Now the parent fields are in scope when you prime the
children. It's code you can't make a typo when you write. Your DCT
does all the complex code that is easy to mess up.
On 28 Dec 2009 09:56:39 -0500, Edvard Korsb�k <Edvard uden for meget
spam at bb-soft dot dk> wrote:
>PRIMERECORD() handles all the difficult with inserting records.
>I use each and every time
>ACCESS:FILE.PrimeRecord()
>....Set values
>IF ACCESS:FILE.Tryinsert() <> level:Benign
> ACCESS:FILE.CanCelAutoInc()
>END
>
>Has never faile me.
---------------------------------------
Paul Blais - Hayes, Virginia