Por que não posso executar NEXT_RECORD, FIRST_RECORD, GO_RECORD, GO_BLOCK em uma procedure que é chamada a partir de trigger PRE-INSERT ?
Quando e onde poderei então usar estes build-in ?
PROCEDURE EM TRIGGER PRE-INSERT
- dr_gori
- Moderador
- Mensagens: 5024
- Registrado em: Seg, 03 Mai 2004 3:08 pm
- Localização: Portland, OR USA
- Contato:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Essas built-in GO_ITEM, GO_BLOCK, etc são restritas!
Veja o que o HELP tem a dizer sobre elas (em ingles, infelizmente)
Veja o que o HELP tem a dizer sobre elas (em ingles, infelizmente)
Pode usá-las em botões, ou nas triggers when-new-Instance.About restricted built-in subprograms
Any built-in subprogram that initiates navigation is restricted. This includes subprograms that move the input focus from one item to another, and those that involve database transactions. Restricted built-ins are not allowed in triggers that fire in response to navigation.
For example, the GO_ITEM and NEXT_SET built-ins are both restricted procedures. GO_ITEM moves the input focus from a source item to a target item, which requires navigation. Similarly, the NEXT_SET procedure causes Form Builder to navigate internally to the block level, fetch a set of records, and then navigate to the first item in the first record. (Note that this navigation happens internally as a result of default processing, and may not be apparent to the form operator.)
Because GO_ITEM and NEXT_SET both initiate navigation, they cannot be called from triggers that fire in response to internal navigational events; that is, triggers that fire while navigation is already occurring. Thus, a restricted procedure cannot be called from a Pre-Block trigger, because the Pre-Block trigger fires during internal navigation. In fact, restricted subprograms are not allowed from any PRE- or POST- navigational triggers.
You can, however, call a restricted built-in subprogram from a When-New-Instance trigger. For example, the When-New-Item-Instance trigger fires after navigation to an item has succeeded, when the form is waiting for input. This is an important point to remember as you select trigger types during application development.
The reference topic of each trigger has a "Legal Commands" section that describes which types of built-ins (restricted or unrestricted) can be called from the trigger. Also, each built-in description includes a "Built-in Type" section that indicates whether the built-in is a restricted or unrestricted procedure or function.
-
- Informação
-
Quem está online
Usuários navegando neste fórum: Nenhum usuário registrado e 15 visitantes