Estou precisando de uma ajuda para utilizar o default where (set_block_property) alguém pode me passar a sintaxe?
att
Default where
-
- Rank: Estagiário Pleno
- Mensagens: 4
- Registrado em: Ter, 02 Dez 2008 9:46 am
- Localização: Porto Alegre
- 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
Tem no HELP do forms:
Procure por SET_BLOCK_PROPERTY
Procure por SET_BLOCK_PROPERTY
Description
Sets the given block characteristic of the given block.
Syntax
SET_BLOCK_PROPERTY
(block_id Block,
property VARCHAR,
value VARCHAR);
SET_BLOCK_PROPERTY
(block_id Block,
property VARCHAR,
x NUMBER);
SET_BLOCK_PROPERTY
(block_id Block,
property VARCHAR,
x NUMBER
y NUMBER);
SET_BLOCK_PROPERTY
(block_name VARCHAR2,
property VARCHAR,
value VARCHAR);
SET_BLOCK_PROPERTY
(block_name VARCHAR2,
property VARCHAR,
x NUMBER);
SET_BLOCK_PROPERTY
(block_name VARCHAR2,
property VARCHAR,
x NUMBER,
y NUMBER);
Built-in Type unrestricted procedure
Enter Query Mode yes
Parameters
block_id The unique ID Form Builder assigned to the block when you created it. Datatype is BLOCK.
block_name The name you gave the block when you created it. Datatype is VARCHAR2.
property Specify one of the following constants:
ALL_RECORDS Specifies whether all the records matching the query criteria should be fetched into the data block when a query is executed.
BLOCKSCROLLBAR_POSITION Specifies both the x and y positions of the block's scroll bar in the form coordinate units indicated by the Coordinate System form property.
BLOCKSCROLLBAR_X_POS Specifies the x position of the block's scroll bar in the form coordinate units indicated by the Coordinate System form property.
BLOCKSCROLLBAR_Y_POS Specifies the y position of the block scroll bar in the form coordinate units indicated by the Coordinate System form property.
COORDINATION_STATUS Specifies a status that indicates whether a block that is a detail block in a master-detail relation is currently coordinated with all of its master blocks; that is, whether the detail records in the block correspond correctly to the current master record in the master block. Valid values are COORDINATED and NON_COORDINATED
CURRENT_RECORD_ATTRIBUTE Specify the VARCHAR2 name of a named visual attribute to be associated with the given block. If the named visual attribute does not exist, you will get an error message.
CURRENT_ROW_BACKGROUND_COLOR The color of the object's background region.
CURRENT_ROW_FILL_PATTERN The pattern to be used for the object's fill region. Patterns are rendered in the two colors specified by Background Color and Foreground Color.
CURRENT_ROW_FONT_NAME The font family, or typeface, that should be used for text in the object. The list of fonts available is system-dependent.
CURRENT_ROW_FONT_SIZE The size of the font, specified in points.
CURRENT_ROW_FONT_SPACING The width of the font, that is, the amount of space between characters (kerning).
CURRENT_ROW_FONT_STYLE The style of the font.
CURRENT_ROW_FONT_WEIGHT The weight of the font.
CURRENT_ROW_FOREGROUND_COLOR The color of the object's foreground region. For items, the Foreground Color attribute defines the color of text displayed in the item.
CURRENT_ROW_WHITE_ON_BLACK Specifies that the object is to appear on a monochrome bitmap display device as white text on a black background.
DEFAULT_WHERE Specifies a default WHERE clause for the block, overriding previous WHERE clauses. (Note: this will not override a value established at design time via the Property Palette for the data block’s WHERE clause property.)
Enclose in single quotes. The WHERE reserved word is optional. The default WHERE clause can include references to global variables, form parameters, and item values, specified with standard bind variable syntax.
DELETE_ALLOWED Specifies whether the operator or the application is allowed to delete records in the given block. Valid values are PROPERTY_TRUE or PROPERTY_FALSE.
DML_DATA_TARGET_NAME Specifies the name of the block's DML data source.
ENFORCE_PRIMARY_KEY Specifies that any record inserted or updated in the block must have a unique characteristic in order to be committed to the database. Valid values are PROPERTY_TRUE or PROPERTY_FALSE.
INSERT_ALLOWED Specifies whether the operator or the application is allowed to insert records in the given block. Valid values are PROPERTY_TRUE or PROPERTY_FALSE.
KEY_MODE Specifies the key mode for the block. This is particularly useful when running Form Builder against non-ORACLE data sources. Valid values are UPDATEABLE_PRIMARY_KEY and NONUPDATEABLE_PRIMARY_KEY.
LOCKING_MODE Specifies the block's LOCKING_MODE property. Valid values are DELAYED or IMMEDIATE.
MAX_QUERY_TIME Specifies the maximum query time. The operator can abort a query when the elapsed time of the query exceeds the value of this property.
MAX_RECORDS_FETCHED Specifies the maximum number of records that can be fetched. This property is only useful when the Query All Records property is set to Yes.
NAVIGATION_STYLE Specifies the block's NAVIGATION_STYLE property. Valid values are SAME_RECORD, CHANGE_RECORD, or CHANGE_BLOCK.
NEXT_NAVIGATION_BLOCK Specifies the name of the block's next navigation block. By default, the next navigation block is the block with the next higher sequence number; however, the NEXT_NAVIGATION_BLOCK block property can be set to override the default block navigation sequence.
OPTIMIZER_HINT Specifies a hint that Form Builder passes on to the RDBMS optimizer when constructing queries. This allows the form designer to achieve the highest possible performance when querying blocks.
ORDER_BY Specifies a default ORDER BY clause for the block, overriding any prior ORDER BY clause. Enclose in single quotes but do not include the actual words 'ORDER BY'. Form Builder automatically prefixes the statement you supply with "ORDER BY."
PRECOMPUTE_SUMMARIES[Under Construction]
PREVIOUS_NAVIGATION_BLOCK Specifies the name of the block's previous navigation block. By default, the previous navigation block is the block with the next lower sequence number; however, the NEXT_NAVIGATION_BLOCK block property can be set to override the default block navigation sequence.
QUERY_ALLOWED Specifies whether a query can be issued from the block, either by an operator or programmatically. Valid values are PROPERTY_TRUE or PROPERTY_FALSE.
QUERY_DATA_SOURCE_NAME Specifies the name of the block's query data source. Note: You cannot set a blocks’ QUERY_DATA_SOURCE_NAME when the block’s datasource is a procedure.
QUERY_HITS Specifies the NUMBER value that indicates the number of records identified by the COUNT_QUERY operation.
UPDATE_ALLOWED Specifies whether the operator or the application is allowed to update records in the given block. Valid values are PROPERTY_TRUE or PROPERTY_FALSE.
UPDATE_CHANGED_COLUMNS Specifies that only those columns updated by an operator will be sent to the database. When Update Changed Columns Only is set to No, all columns are sent, regardless of whether they have been updated. This can result in considerable network traffic, particularly if the block contains a LONG data type.
value The following constants can be passed as arguments to the property values described earlier:
COORDINATED Specifies that the COORDINATION_STATUS property should be set to COORDINATED for a block that is a detail block in a master-detail relation.
DELAYED Specifies that you want Form Builder to lock detail records only at the execution of a commit action.
IMMEDIATE Specifies that you want Form Builder to lock detail records immediately whenever a database record has been modified.
NON_COORDINATED Specifies that the COORDINATION_STATUS property should be set to NON_COORDINATED for a block that is a detail block in a master-detail relation.
NON_UPDATEABLE_PRIMARY_KEY Specifies that you want Form Builder to process records in the block on the basis that the underlying data source does not allow primary keys to be updated.
PROPERTY_TRUE Specifies that the property is to be set to the TRUE state. Specifically, supply as the value for DELETE_ALLOWED, INSERT_ALLOWED, QUERY_HITS, and UPDATE_ALLOWED.
PROPERTY_FALSE Specifies that the property is to be set to the FALSE state.
UNIQUE_KEY Specifies that you want Form Builder to process records in the block on the basis that the underlying data source uses some form of unique key, or ROWID.
UPDATEABLE_PRIMARY_KEY Specifies that you want Form Builder to process records in the block on the basis that the underlying data source allows for primary keys to be updated.
x The NUMBER value of the axis coordinate specified in form coordinate system units. If setting both x and y positions this value refers to the x coordinate. When setting the y position only, this value refers to the y coordinate.
y The NUMBER value of the y axis coordinate specified in form coordinate system units. This value applies when setting both x and y positions, and can be ignored for all other properties.
-
- Rank: Estagiário Pleno
- Mensagens: 4
- Registrado em: Ter, 02 Dez 2008 9:46 am
- Localização: Porto Alegre
Isso eu já tinha feito.
CAmpanha: Antes de dar ctrl + c & ctrl + v entenda!
CAmpanha: Antes de dar ctrl + c & ctrl + v entenda!
- 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
OK, aí vai
Passando o nome do bloco
Passando o id do bloco
Passando o nome do bloco
SET_BLOCK_PROPERTY('SEUBLOCO', DEFAULT_WHERE, 'CAMPO=10');
DECLARE
blk_id Block;
BEGIN
blk_id := Find_Block('SEUBLOCO');
Set_Block_Property(blk_id, DEFAULT_WHERE, 'SEUWHERE VAI AQUI');
END;
-
- Rank: Estagiário Pleno
- Mensagens: 4
- Registrado em: Ter, 02 Dez 2008 9:46 am
- Localização: Porto Alegre
Consegui fazer o que queria, vlw
-
- Informação
-
Quem está online
Usuários navegando neste fórum: Nenhum usuário registrado e 21 visitantes