您的位置:首页 > 数据库 > Oracle

Using GET_APPLICATION_PROPERTY in Oracle D2k Forms

2016-12-25 22:26 316 查看

Using GET_APPLICATION_PROPERTY in Oracle D2k Forms

Description[/b]
Returns information about the current Form Builder application. You must call the built-in once for each
value you want to retrieve.
Usage Notes[/b]
To request a complete login, including an appended connect string, use the Username, Password, and
Connect_String properties. For instance, assume that the user has initiated an Microsoft Windows
Runform session specifying the following connect string:

ifrun60 my_form scott/tiger@corpDB1
Form Builder returns the following string as the result of a call to
GET_APPLICATION_PROPERTY(USERNAME):
scott
Form Builder returns the following string as the result of a call to
GET_APPLICATION_PROPERTY(PASSWORD):
tiger
Form Builder returns the following string as the result of a call to
GET_APPLICATION_PROPERTY(CONNECT_STRING):
corpDB1

GET_APPLICATION_PROPERTY examples[/b]
Example 1[/b]
/*
** Built-in: GET_APPLICATION_PROPERTY
** Example: Determine the name of the timer that just
** expired, and based on the username perform a
** task.
** trigger: When-Timer-Expired
*/
DECLARE
tm_name VARCHAR2(40);
BEGIN
tm_name := Get_Application_Property(TIMER_NAME);
IF tm_name = ’MY_ONCE_EVERY_FIVE_MINUTES_TIMER’ THEN
:control.onscreen_clock := SYSDATE;
ELSIF tm_name = ’MY_ONCE_PER_HOUR_TIMER’ THEN
Go_Block(’connected_users’);
Execute_Query;
END IF;
END;
Example 2[/b]
/*
** Built-in: GET_APPLICATION_PROPERTY
** Example: Capture the username and password of the
** currently logged-on user, for use in calling
** another Tool.
*/
PROCEDURE Get_Connect_Info( the_username IN OUT VARCHAR2,
the_password IN OUT VARCHAR2,
the_connect IN OUT VARCHAR2) IS
BEGIN
the_username := Get_Application_Property(USERNAME);
the_password := Get_Application_Property(PASSWORD);
the_connect := Get_Application_Property(CONNECT_STRING);
END;
Example 3[/b]
Making window0 in center of screen
DECLARE
VWIDTH NUMBER := GET_APPLICATION_PROPERTY(DISPLAY_WIDTH);
VHEIGHT NUMBER := GET_APPLICATION_PROPERTY(DISPLAY_HEIGHT);
wwidth number := get_window_property('window0', width);
wheight number := get_window_property('window0', height);
BEGIN
SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WINDOW_STATE, MAXIMIZE);
SET_WINDOW_PROPERTY('WINDOW0', x_pos, (vwidth - wwidth) / 2);
SET_WINDOW_PROPERTY('WINDOW0', y_pos, (vheight - wheight-100) / 2 );
end;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐