Add Data Block Manually (Add Text Item to Display Data) Without Using Wizard
Object Navigator > Select Data Blocks > Click '+' symbol
Build a new data block manually
Click OK
Block automatically created/named (eg. BLOCK51)
Rename Block51 to STUDENT or STUDENT_BLOCK (or whatever name)
Double click BLOCK51 for property palette or right click BLOCK51 > Property Palette
Under Database category, find 'Query Data Source Name' and enter STUDENT (must be required table name)
Under Database category, find 'Query Data Source Column' and enter column names required (STUDENT_ID, STUDENT_NAME, AGE)
*type, length, precision, scale based on database
*Tick Mandatory if data is NOT NULL (set to NOT NULL in database)
Click OK
Add Text Item
From Tool Palette, select Text Item to create in canvas (eg TEXT_ITEM53)
Right click text_item53 box > Property Palette
Find 'Name' and rename to STUDENT_ID (must be the column name to display)
Find 'Prompt' and enter Student ID (for text item label)
Repeat Add Text Item steps for STUDENT_NAME and AGE
Compile (Ctrl+T) and Run Form (Ctrl+R) for test.
No comments:
Post a Comment