Subject | RE: [IBO] Duplicating rows |
---|---|
Author | Riho-Rene Ellermaa |
Post date | 2002-03-04T13:10:12Z |
>Riho-Rene,
>1. I'm using AfterInsert to fill in some fields (doc.no., statuses etc)
>and I also have generator for ID-s.
>This function is called before I set RowData values, so I have to set ID
>and DOCNO manualy afterward. This means, that
>my generator and document numbering systems loose one value. Can I disable
>generator and AfterInsert during duplication?
This isn't clear enough.
Why do you have to set ID manually at all? Why not use GeneratorLinks for it?
Why are you losing any values in your generators? Do you have triggers
that are forcing new numbers into these fields? You need to make your
Before Insert trigger as
I don't have any triggers in database, I have GeneratorLinks. If I don't change ID value, then after Insert() and setting RowData I get "Key violation", when trying to Post(), because RowData contains also the source records ID.
Do you mean that I must put Before Insert triggers everywere?
Riho-Rene Ellermaa
senior programmer
Hansabank
[Non-text portions of this message have been removed]