Sample External Object (SQL) Source Code


Sample External Object (SQL)

Calling a Sample External Object (SQL)   This document will explain how to create, register, and call a sample External Object written in SQL. Recall from basic training that the purpose of an External Object is to call your back-end business logic directly through an m-Power web application. In this case, the purpose of this […]

Register SQL Views

Register SQL Views   An SQL View can be thought of as a virtual table — one that does not physically contain any data but rather stores useful SQL queries to improve database/user efficiency. While most developers realize how powerful an SQL view can be while running queries, they can now harness the same functionality […]

Validating via an SQL Procedure Source Code

Validating via an SQL Procedure Source Code   create procedure mrcworklib.validdates (inout i_error char(99),  inout i_strdate decimal(8,0),  inout i_enddate decimal(8,0)) LANGUAGE SQL CASE when i_strdate = 0 and i_enddate = 0 then    set i_error = 'You have not entered any dates.'; when i_strdate = 0 then    set i_error = 'You must enter a starting date.'; […]

Validating via an SQL External Object

Validating via an SQL Procedure   This document will explain how to create and call an external object SQL procedure for validity checking. For basic information regarding validity checking please see this document. The source code for the SQL used in this example can be found here. The purpose of this object is to check […]

Performance Considerations

Performance Considerations   Jump to: How to Build an Index Retrievals Basic Example Advanced Example Reports Standard Report Templates with Detail Interactive Report Template & Creating Dropdown Lists from the Current Application Standard Report Templates with No Detail / Interactive Report Template Working with Runtime Record Selections Summaries Maintenance Other Things to Consider This document […]

Calculation Screen

Calculation Screen Calculation Features Calculation Types Creating Calculations Calculation Features Calculations as Sequence keys and Record Selection fields — Calculations have been designed to take full advantage of SQL. Nearly every calculation is available to use as a sequence field or record selection field. Sequence/Record Selection Availability — The Work-with Calculation screen shows which calculations […]

Sample UDF Code

Sample User-Defined Function (UDF) Code   Every database has its own rules for languages which may be used to write User Defined Functions (UDFs). Here are two examples, one written in SQL and another in RPG, showing how to create functions for DB2/400. Example 1: Writing a UDF with SQL We are going to build […]

Utilizing Multi-Member Files in m-Power

Utilizing Multi-Member Files in m-Power   Many m-Power users believe that they are unable to utilize their multi-member files in m-Power because m-Power was designed to work over Databases other than DB2. Since these other databases do not have multi-member files, we removed the ability from the interface to access these multi-member files. However, there […]

Override Default SQL Statement

Override Default SQL Statements   m-Power applications allow you to have the ability to manually override the default SQL statement. Some customers wish to do this to be able to fully customize which data is extracted from the database. To do this, build your application as you normally would. In the illustration provided below, we […]