Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you show data from table in a block

Status
Not open for further replies.

walterdude

Programmer
Aug 14, 2002
4
0
0
BE
When I compile and run a form it should show the first record from a table in the text-fields but all the fields are empty. How do i get the data from my table to show in the fields in the block?
 
in when-new-form-instance trigger
--Enter_query;
Execute_query;
 
Do i have to replace Enter_Query by the query i need to use?
 
Enter_Query is procedure and form go to enter-query mode.
If you want set a query you must set block property
DEFAULT_WHERE

DECLARE
sWhere VARCHAR2(1000);
sOrder VARCHAR2(1000);
BEGIN
sWhere := 'ID_TAB = 1234';
sOrder := 'ID_TAB';
set_block_property(id_block,DEFAULT_WHERE,sWhere);
set_block_property(id_block,ORDER_BY,sOrder);
Execute_Query;
END;
If you want only to add others conditions to existing set
condition use get_block_property(id_block,DEFAULT_WHERE).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top