El nexo entre tecnología y negocios
 
[ AHF00113 ] Possibility of performing user's queries where a business class specifies the SQL sentence to execute
Summary
When updating Apia to one of the releases here mentioned, the following SQL sentences must be executed. These will allow to create user's queries where a business class specifies the SQL sentence to return data.

It is applied to
  • Apia 2.2.162.26.
  • Apia 2.2.163.9.


Solution

The following sql sentences must be executed:

To all data bases

insert into event (evt_id_auto,evt_name,evt_scope,evt_desc) values (39,'ONBEFOREGETSQL','Q','Query before get SQL');

DELETE FROM LABELS where LBL_SET_ID=1 and LANG_ID < 1000 and LBL_ID in ('lblQryEvtBeforeGetSQL');

INSERT INTO LABELS (LBL_SET_ID, LANG_ID, LBL_ID, LBL_NAME, LBL_TOOL_TIP, LBL_ACCESS_KEY, LBL_DESC, REG_USER, REG_STATUS)
VALUES( 1, 1, ' lblQryEvtBeforeGetSQL ', 'onBeforeExecuteSQL', '', '', '', 'admin', 0);
INSERT INTO LABELS (LBL_SET_ID, LANG_ID, LBL_ID, LBL_NAME, LBL_TOOL_TIP, LBL_ACCESS_KEY, LBL_DESC, REG_USER, REG_STATUS)
VALUES( 1, 2, ' lblQryEvtBeforeGetSQL ', 'onBeforeExecuteSQL', '', '', '', 'admin', 0);

INSERT INTO LABELS (LBL_SET_ID, LANG_ID, LBL_ID, LBL_NAME, LBL_TOOL_TIP, LBL_ACCESS_KEY, LBL_DESC, REG_USER, REG_STATUS)
VALUES( 1, 3, ' lblQryEvtBeforeGetSQL ', 'onBeforeExecuteSQL', '', '', '', 'admin', 0);


Related from
[ AFC00114 ] Posibility of executing a business class before showing the results of a query
[ ATI00164 ] Requested columns for "User's queries"
Suggested items
[ AHT00096 ] How to execute queries and business classes from a web service
[ ATI01561 ] Datasheet "Query filter BC design"
[ ATI01558 ] Datasheet "Java BC Design"
[ ABR00030 ] The exeption is not being captured when the executable of a business class does not exist.
[ AFC00589 ] Upload .class in business classes design
[ ATI01562 ] Datasheet "Business rule BC design"
[ AHT00156 ] Example of the creation of a business class of type "Business rule"
[ AHT00133 ] How to know which line of a grid is executing an event
[ ANF00168 ] Business classes' execution
[ ANF00224 ] Pass attribute as paramater to a business class