码迷,mamicode.com
首页 > 移动开发 > 详细

Using GET_APPLICATION_PROPERTY in Oracle D2k Forms

时间:2016-12-25 23:45:53      阅读:351      评论:0      收藏:0      [点我收藏+]

标签:stat   password   mic   ica   idt   tool   ret   white   determine   

Description
Returns information about the current Form Builder application. You must call the built-in once for each
value you want to retrieve.
Usage Notes
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
Example 1
/*
** 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
/*
** 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
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;

Using GET_APPLICATION_PROPERTY in Oracle D2k Forms

标签:stat   password   mic   ica   idt   tool   ret   white   determine   

原文地址:http://www.cnblogs.com/quanweiru/p/6220778.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!