You must enable javascript in order to view this page or you can go
here
to view the webhelp.
Genero Business Development Language Tutorial 4.01
Content
Search Results
Index
Loading, please wait ...
How to write an application in Genero BDL
Testing the Example Programs
Tutorial Chapters
Documentation conventions
Syntax diagrams
Notes, tips, and warnings
Code examples
Tutorial Chapter 1: Overview
Overview
The BDL Language
The BDL Tutorial
The Example Database (custdemo)
The Sample Data
Tutorial Chapter 2: Using BDL
A simple BDL program
Compiling and Executing the Program
Debugging a BDL Program
The "Connect to database" Program
Example: connectdb.4gl
Tutorial Chapter 3: Displaying Data (Windows/Forms)
Application Overview
The .4gl File - Opening Windows® and Forms
The .4gl File - Interacting with the User
The .4gl File - Retrieving and Displaying Data
Example: dispcust.4gl (function query_cust)
The Form Specification File
Example: Form Specification File custform.per
Compiling the Program and Form
Tutorial Chapter 4: Query by Example
Implementing Query-by-Example
Steps for implementing Query-by-Example
Using CONSTRUCT and STRING variables
Preparing the SQL Statement
Allowing the User to Cancel the Query Operation
Predefined Actions (accept/cancel)
DEFER INTERRUPT and the INT_FLAG
Conditional Logic
The IF statement
The CASE statement
The Query program
Example: Module custmain.4gl
Example: Module custquery.4gl
Example: custquery.4gl (Function get_cust_cnt)
Retrieving data from the Database
Using Cursors
The SQLCA.SQLCODE
Example custquery.4gl (function cust_select)
Example: custquery.4gl (function fetch_cust)
Example: custquery.4gl (function fetch_rel_cust)
Example: custquery.4gl (function display_cust)
Compiling and Linking the Program
Modifying the Program to Handle Errors
The WHENEVER ERROR statement
Negative SQLCA.SQLCODE
SQLERRMESSAGE
Close and Free the Cursor
Error if Cursor is not Open
Tutorial Chapter 5: Enhancing the Form
Adding a Toolbar
Example: (in custform.per)
Adding a Topmenu
Example ( in custform.per)
Adding a COMBOBOX form item
Changing the Window Appearance
Example: (in custform.per)
Example: (in custmain.4gl)
Managing Actions
Disable/Enable Actions
The Close Action
Example: (custmain.4gl)
Action Defaults
MENU/Action Defaults Interaction
Images
Tutorial Chapter 6: Add, Update and Delete
Entering data on a form: INPUT statement
UNBUFFERED attribute
WITHOUT DEFAULTS attribute
Updating Database Tables
SQL transactions
Concurrency and Consistency
Adding a new row
INPUT Statement Control blocks
Example: add a new row to the customer table
Module custmain.4gl
Module custquery.4gl (function inpupd_cust)
Module custquery.4gl (function insert_cust)
Updating an existing Row
Using a work record
SELECT ... FOR UPDATE
SCROLL CURSOR WITH HOLD
Example: Updating a Row in the customer table
Module custquery.4gl
Deleting a Row
Using a dialog Menu to prompt for validation
Example: Deleting a Row
Tutorial Chapter 7: Array Display
Defining the Form
Screen Arrays
TABLE Containers
The INSTRUCTIONS section
Form example: manycust.per
Creating the Function
Program Arrays
Loading the Array: the FOREACH Statement
The DISPLAY ARRAY Statement
The COUNT attribute
The ARR_CURR function
Example Library module: cust_lib.4gl
Paged Mode of DISPLAY ARRAY
What is the Paged mode?
AFTER DISPLAY block
Example of paged mode
Compiling and using a Library
Example: cust_stub.4gl
Tutorial Chapter 8: Array Input
The INPUT ARRAY statement
WITHOUT DEFAULTS clause
The UNBUFFERED attribute
COUNT and MAXCOUNT attributes
Control Blocks
Built-in Functions - ARR_CURR
Predefined actions
Example: Using a Screen Array to modify Data
The Form Specification File
The Main block
Function load_custall
Function inparr_custall
Function store_num_ok
Function insert_cust
Function update_cust
Function delete_cust
Tutorial Chapter 9: Reports
BDL Reports
The Report Driver
The Report Definition
The DEFINE section
The OUTPUT section (optional)
The ORDER BY section (optional)
The FORMAT section
Two-pass reports
Example: Customer Report
The Report Driver
The Report Definition
Interrupting a Report
The interrupt action view
Refreshing the Display
Using a ProgressBar
Example: Interruption Handling
The Form Specification File
Modifications to custreports.4gl
The cust_report function
Tutorial Chapter 10: Localization
Localization Support
Localized Strings
Programming Steps
Strings in Sources
Extracting Strings
Compiling String Source Files (fglmkstr)
Deploying String Files
Example: Localization
form.per
- the form specification file
prog.4gl - the program module
Compiling the program
Tutorial Chapter 11: Master/Detail
The Master-Detail sample
The Makefile
The Customer List Module
The Stock List Module
The Master-Detail Form Specification File
The Orders Program orders.4gl
The MAIN program block
Function setup_actions
Function order_new
Function order_insert
Function order_query
Function order_fetch
Function order_select
Function order_fetch_rel
Function order_total
Function order_close
Function items_fetch
Function items_show
Function items_inpupd
Function items_line_total
Function item_insert
Function item_update
Function item_delete
Function get_stock_info
Tutorial Chapter 12: Changing the User Interface Dynamically
Built-in Classes
Working with Forms
Hiding Form Items
Adding toolbars, topmenus, and action defaults
Specifying a Function to Initialize all Forms
Loading a ComboBox List
Using the Dialog class in Interactive Statements
Hiding Default Action Views
Enabling and Disabling Fields
Using the Interface Class
Tutorial Chapter 13: Master/Detail using Multiple Dialogs
The Master-Detail sample
The Customer List Form
The Customer List Module
The Orders Form
The Orders Program orders.4gl
Module variables of orders.4gl
Function orditems_dialog
Function order_update
Function order_new
Function order_validate
Function order_query
Copyrights and Trademarks
Your browser does not support iframes.