Creating a Data Block
To create a data block from a table:
- Choose Tools | Data Block Wizard to invoke a
wizard that guides you through the process of building a data block.
Or,
- In the Object Navigator, click the Blocks node.
- Click Create in the toolbar.
- Double-click the Block object icon to display the Property Palette.
- Under the Database node:
Set the Query Data Source Type property to Table.
Enter the name of a database table in the Query Data
Source Name field.
- Under the Advanced Database node:
Set the DML Data Target Type property to Table.
Enter the name of your data source in the DML Data Source
Name field.
- Under the General node, click the Name
property, then enter a name or accept the default name.
You can use any name that follows ORACLE naming conventions and is unique
among blocks in the form. The block name is an internal descriptor that is
not displayed at runtime.
Tip: Set_Block_Property(..,
QUERY_HITS) lets your ON-COUNT transactional
trigger tell Oracle Forms how many records the query (that you are handling
yourself) will return so it may print out the message :
FRM-xxxxx: Query will retrieve nnn record(s).
Getting this property via Get_Block_Property(..,
QUERY_HITS) simply returns the number of records that have been retrieved
by the query.
Get_Block_Property(.., QUERY_OPTIONS) lets
your transactional trigger know whether it's supposed to be doing a normal query,
a COUNT(*) type query, or a lock record query.
Related topic
Setting properties in the Property Palette