Boa tarde,
Como faço para trocar o status do System.record_status?
No meu caso está INSERT, quero alterar para CHANGED.
Obrigado!
System.record_status
- 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
Procure por SET_RECORD_PROPERTY
Parameters
record_number - Specifies the number of the record whose status you want to set. The record number is the record's position in the block. Specify as a whole number.
block_name Specifies the name of the block in which the target record exists. The data type of the name is VARCHAR2.
property Use the following property:
STATUS Specifies that you intend to change the record status. STATUS is a constant.
value Use one of the following values:
CHANGED_STATUS Specifies that the record should be marked for update and should be treated as an update when the next commit action occurs.
INSERT_STATUS Specifies that the record is to be marked as an INSERT and should be inserted into the appropriate table when the next commit action occurs.
NEW_STATUS Specifies that the record is to be treated as a NEW record, that is, a record that has not been marked for insert, update, or query. Changed but uncleared or uncommitted records cannot be assigned a status of NEW.
QUERY_STATUS Specifies that the record is to be treated as a QUERY record, whether it actually is. See also the CREATE_QUERIED_RECORD built-in.
/*
** Built-in: SET_RECORD_PROPERTY
** Example: Mark the third record in the EMP block as if it
** were a queried record.
*/
BEGIN
Set_Record_Property( 3, 'EMP', STATUS, QUERY_STATUS);
END;
Parameters
record_number - Specifies the number of the record whose status you want to set. The record number is the record's position in the block. Specify as a whole number.
block_name Specifies the name of the block in which the target record exists. The data type of the name is VARCHAR2.
property Use the following property:
STATUS Specifies that you intend to change the record status. STATUS is a constant.
value Use one of the following values:
CHANGED_STATUS Specifies that the record should be marked for update and should be treated as an update when the next commit action occurs.
INSERT_STATUS Specifies that the record is to be marked as an INSERT and should be inserted into the appropriate table when the next commit action occurs.
NEW_STATUS Specifies that the record is to be treated as a NEW record, that is, a record that has not been marked for insert, update, or query. Changed but uncleared or uncommitted records cannot be assigned a status of NEW.
QUERY_STATUS Specifies that the record is to be treated as a QUERY record, whether it actually is. See also the CREATE_QUERIED_RECORD built-in.
-
- Rank: Programador Júnior
- Mensagens: 24
- Registrado em: Qua, 26 Mai 2010 10:17 am
- Localização: São Paulo
Mas onde eu devo colocar esse código ??
No meu caso, tenho uma trigger "when button pressed"
Coloquei um "message(:system.record_status )" no começo da trigger.
E ele me trouxe um INSERT como mensagem. Ou seja o status está como INSERT.
Como altero para CHANGED?
Obrigado.
No meu caso, tenho uma trigger "when button pressed"
begin
if :system.record_status = 'CHANGED' then .....
message(:system.record_status )"
begin
if :system.record_status = 'CHANGED' then .....
Como altero para CHANGED?
Obrigado.
-
- Informação
-
Quem está online
Usuários navegando neste fórum: Nenhum usuário registrado e 16 visitantes