Forms 10g Tutorial
http://fdtool.free.fr/articles/tutoforms10g/tutoforms10g.htm
Change Button Lable Dynomically
https://forums.oracle.com/thread/2278106
FRM-40654 Record has been updated by another user. Re-query to see change
Solution...
I have faced this issue, also Google it but almost all possible solution was not applicable with my situation. Now i have solved my problem.
Serial Number in Oracle Forms 6i
Solution...
http://fdtool.free.fr/articles/tutoforms10g/tutoforms10g.htm
Change Button Lable Dynomically
https://forums.oracle.com/thread/2278106
Matrix form in forms 10g
FRM-40654 Record has been updated by another user. Re-query to see change
Solution...
I have faced this issue, also Google it but almost all possible solution was not applicable with my situation. Now i have solved my problem.
I have created a form with three different database blocks. When i update or insert any data i face the above error. Although there were no other users to perform DML statement on this form.
- I have changed all post-insert and post-update triggers of each block.
- I have placed all post-insert and post-update statements in pre-insert and pre-update triggers i.e. those statements which insert or update the other block data not database.
Suppose a form contains Block1, Block2, and Block3. All these blocks have master - detail relations.
Any statement in post-insert or post-update trigger of Block1 change the data of Block2 or Block3 not database then the form would raise frm-40654 error at the time of commit or updating the form so that statement should be moved in pre-insert or pre-update trigger instead of post-insert or post-update.
Hope my above experience would help others. If so please comments.
Serial Number in Oracle Forms 6i
Solution...
You can use :SYSTEM.TRIGGER_RECORD in POST-QUERY to assign its value to a display item in your block. If you are to create records in this block, then you will also need to put it in WHEN-CREATE-RECORD or some similar trigger depending on what scenario you need to cover.
There is :SYSTEM.CURSOR_RECORD (not :SYSTEM.CURRENT_RECORD) but it may not give you the required output
as it represents the record's current physical order in the block's list of records and you may not be navigating to all records.
Manipulating a stacked canvas pro grammaticallyDisplaying a Stacked Canvas To programmatically display a stacked canvas in the
window to which it is assigned, you can use the SHOW_VIEW built-in procedure.
(Note that a stacked canvas' Visible property is set to No by default.)Moving a Stacked Canvas To move the stacked canvas to a different location on
the underlying content canvas, use the built-in procedure SET_VIEW_PROPERTY
(which changes the canvas' Viewport Position property).
Note that this will not change theregion of the canvas that is visible in the
view.Increasing the Dimensions of the View To increase the dimensions of a stacked
canvas' view (so that more of the canvas is visible), use the built-in procedure
SETVIEW_PROPERTY. Note that increasing the of the view does not change the X,Y
coordinates of its upper-left corneron the stacked canvas, nor does it change
the position of the view itself relative to the underlying content canvas.Scrolling a Stacked Canvas To scroll a stacked canvas so that a different region
of the canvas is visible, use the built-in procedure SCROLL_VIEW (which moves
the view relative to its canvas).Examples /* Example 1: These 2 procedure calls both display the stacked ** canvas STACK_IT: */ SHOW_VIEW('stack_it'); SET_VIEW_PROPERTY('stack_it', visible, property_true); /* Example 2: This procedure call scrolls the view of the stacked** canvas STACK_ITto X,Y coordinates 12 and 0: */ SCROLL_VIEW('stack_it', 12, 0); /* Example 3: This procedure call changes the position of the** stacked canvas STACK_IT to X,Y coordinates 12 and 20 on the** underlying content canvas: */ SET_VIEW_PROPERTY('stack_it', display_position, 12, 20); /* Example 4: This procedure call increases the width of the view,** thereby making more of the canvas visible: */ SET_VIEW_PROPERTY('stack_it', width, 22);
HOW TO CODE THE AUTOMATIC TIME AND DATE IN FORMS 6i
You can use timer in forms 6i to display a clock.
Method:
Create a Display Item. Data Type is Char.
In When-New-Form-Instance Trigger, write this code:
DECLARE
CurrTime TIMER;
OneSecond CONSTANT NUMBER := 1000;
BEGIN
CurrTime := CREATE_TIMER('CURRTIME',OneSecond,REPEAT);
END;
In When-TImer-Expired Trigger, write this code
DECLARE
In When-TImer-Expired Trigger, write this code
DECLARE
ExpTimer VARCHAR2(40) := Get_Application_Property(TIMER_NAME);
vTime Varchar2(30) := :SYSTEM.CURRENT_DATETIME;
BEGIN
IF ExpTimer = 'CURRTIME' THEN
:Your_Block_Nmae.Item_Name := to_char(sysdate,'HH24:MMI:SS'); END IF;
END;
Note:
Using timers in form builder can kill the performance of the machine if the machine has not good configuration.
I'll recommend at least Pentium4 with more than 3GHZ Intel Processor and 512 MB ram.
Search Words : timer, timer in forms6i, clock in forms6i
Note:
Using timers in form builder can kill the performance of the machine if the machine has not good configuration.
I'll recommend at least Pentium4 with more than 3GHZ Intel Processor and 512 MB ram.
Search Words : timer, timer in forms6i, clock in forms6i
Installation of Oracle Designer10g Repository on Oracle Database 10gR2
--Minimum Setting of spfile
compatible = 9.0.0 # for an Oracle9i database
compatible = 8.1.7 # for an Oracle8i database
max_enabled_roles = 30
sort_area_size = 262144
sort_area_retained_size = 65536
hash_area_size = 1048576
optimizer_index_caching = 50
optimizer_index_cost_adj = 25
shared_pool_size = 32000000
db_block_buffers # comment out on an Oracle9i database
db_block_buffers = 2000 # on an Oracle8i database
open_cursors = 3000
processes = 100
db_file_multiblock_read_count=16 # for a 4K Oracle block size
db_file_multiblock_read_count=32 # for a 2K Oracle block size
db_file_multiblock_read_count=8 # for a 8K Oracle block
connect sys/password@SIDname as sysdba
SQL> alter system set max_enabled_roles = 30 scope = spfile;
System altered.
SQL> alter system set sort_area_size = 262144 scope = spfile;
System altered.
SQL> alter system set sort_area_retained_size = 65536 scope = spfile;
System altered.
SQL> alter system set hash_area_size = 1048576 scope = spfile;
System altered.
SQL> alter system set optimizer_index_caching = 50 scope = spfile;
System altered.
SQL> alter system set optimizer_index_cost_adj = 25 scope = spfile;
System altered.
SQL> alter system set shared_pool_size = 32000000 scope = spfile;
System altered.
SQL> alter system set db_block_buffers = 2000 scope = spfile;
System altered.
SQL> alter system set open_cursors = 3000 scope = spfile;
System altered.
SQL> alter system set processes = 100 scope = spfile;
System altered.
SQL> alter system set db_file_multiblock_read_count=16 scope = spfile;
System altered.
SQL> alter system set db_file_multiblock_read_count=32 scope = spfile;
System altered.
SQL> alter system set db_file_multiblock_read_count=8 scope = spfile;
System altered.
SQL> select file_name, tablespace_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
USERS
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
SYSAUX
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
UNDOTBS1
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
SYSTEM
C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
EXAMPLE
SQL> create tablespace constant_grow_indexes datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\cons
tant_grow_indexes_01.dbf' size 4000k default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
Tablespace created.
SQL> create tablespace constant_grow_TABLES datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\const
ant_grow_tables_01.dbf' size 15000k default storage (initial 100k next 100k minextents 1 maxextents
UNLIMITED pctincrease 0);
Tablespace created.
SQL> create tablespace dependency_indexes datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\depende
ncy_indexes_01.dbf' size 5600k default storage (initial 100k next 100k minextents 1 maxextents UNLIM
ITED pctincrease 0);
Tablespace created.
SQL> create tablespace dependency_tables datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\dependen
cy_tables_01.dbf' size 9000k default storage (initial 100k next 100k minextents 1 maxextents UNLIMIT
ED pctincrease 0);
Tablespace created.
SQL> create tablespace diagram_indexes datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\diagram_in
dexes_01.dbf' size 1000k default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED p
ctincrease 0);
Tablespace created.
SQL> create tablespace diagram_tables datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\diagram_tab
les_01.dbf' size 2000k default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pct
increase 0);
Tablespace created.
SQL> create tablespace lob_data datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\lob_data_01.dbf'
size 1200k default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
Tablespace created.
SQL> create tablespace rapid_grow_indexes datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\rapid_g
row_indexes_01.dbf' size 250000k default storage (initial 100k next 100k minextents 1 maxextents UNL
IMITED pctincrease 0);
Tablespace created.
SQL> create tablespace rapid_grow_tables datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\rapid_gr
ow_tables_01.dbf' size 500000k default storage (initial 100k next 100k minextents 1 maxextents UNLIM
ITED pctincrease 0);
Tablespace created.
SQL> create tablespace system_meta_indexes datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\system
_meta_indexes_01.dbf' size 20000k default storage (initial 100k next 100k minextents 1 maxextents UN
LIMITED pctincrease 0);
Tablespace created.
SQL> create tablespace system_meta_tables datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\system_
meta_tables_01.dbf' size 30000k default storage (initial 100k next 100k minextents 1 maxextents UNLI
MITED pctincrease 0);
Tablespace created.
SQL> create tablespace temporary_indexes datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\temporar
y_indexes_01.dbf' size 5000k default storage (initial 100k next 100k minextents 1 maxextents UNLIMIT
ED pctincrease 0);
Tablespace created.
SQL> create tablespace temporary_tables datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\temporary
_tables_01.dbf' size 9000k default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED
pctincrease 0);
Tablespace created.
SQL> create tablespace version_indexes datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\version_in
dexes_01.dbf' size 9000k default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED p
ctincrease 0);
Tablespace created.
SQL> create tablespace version_tables datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\version_tab
les_01.dbf' size 12000k default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pc
tincrease 0);
Tablespace created.
Make sure you ave plenty of space in your system tablespace
SQL> select tablespace_name, sum(bytes)/1024/1024 from dba_free_space
2 group by tablespace_name;
TABLESPACE_NAME SUM(BYTES)/1024/1024
------------------------------ --------------------
SYSTEM_META_TABLES 29.1484375
UNDOTBS1 28.1875
SYSAUX 8.1875
CONSTANT_GROW_INDEXES 3.7578125
DIAGRAM_INDEXES .9140625
CONSTANT_GROW_TABLES 14.5234375
USERS 1.8125
DEPENDENCY_TABLES 8.6328125
SYSTEM_META_INDEXES 19.3984375
TEMPORARY_INDEXES 4.7734375
TEMPORARY_TABLES 8.6328125
TABLESPACE_NAME SUM(BYTES)/1024/1024
------------------------------ --------------------
SYSTEM 7.3125
EXAMPLE 22.625
DIAGRAM_TABLES 1.828125
LOB_DATA 1.015625
RAPID_GROW_TABLES 488.210938
VERSION_INDEXES 8.6328125
DEPENDENCY_INDEXES 5.3828125
RAPID_GROW_INDEXES 244.054688
VERSION_TABLES 11.578125
20 rows selected.
SQL> alter tablespace system add datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL10G\system03.dbf' si
ze 140m;
Tablespace altered.
SQL> create user owner identified by owner default tablespace users
2 temporary tablespace temp;
User created.
SQL> @ C:\DevSuiteHome_1\repadm61\UTL\CKROROLE.SQL;
Dropping role CK_ORACLE_REPOS_OWNER if it already exists
DROP ROLE CK_ORACLE_REPOS_OWNER
*
ERROR at line 1:
ORA-01919: role 'CK_ORACLE_REPOS_OWNER' does not exist
Creating role CK_ORACLE_REPOS_OWNER
Role created.
Grant succeeded.
Grant succeeded.
***********************************************************************************
* --------------------------------IMPORTANT NOTE:-------------------------------- *
***********************************************************************************
The following Privileges Must be additionally granted to the REPOSITORY OWNER:
Syntax, from within SQL*Plus as the SYS user type (or use cut/edit/paste):
GRANT EXECUTE ON DBMS_RLS TO <repository_owner>;
GRANT EXECUTE ON DBMS_LOCK TO <repository_owner>;
GRANT EXECUTE ON DBMS_PIPE TO <repository_owner>;
GRANT CREATE TABLE TO <repository_owner>;
GRANT CREATE VIEW TO <repository_owner>;
GRANT CREATE PROCEDURE TO <repository_owner>;
GRANT CREATE SYNONYM TO <repository_owner>;
GRANT CREATE SEQUENCE TO <repository_owner>;
GRANT SELECT ON sys.v_$nls_parameters TO <repository_owner> WITH GRANT OPTION;
GRANT SELECT on V_$PARAMETER TO <repository_owner>;
GRANT SELECT ON dba_rollback_segs TO <repository_owner>;
GRANT SELECT ON dba_segments TO <repository_owner>;
GRANT CREATE ANY SYNONYM TO <repository_owner>;
GRANT DROP ANY SYNONYM TO <repository_owner>;
***********************************************************************************
IMPORTANT:
If you want to implement Subordinate User Access using Public Synonyms you MUST
also grant the following to the REPOSITORY OWNER::
Syntax, from within SQL*Plus as the SYS user type (or use cut/edit/paste):
GRANT CREATE PUBLIC SYNONYM TO <repository_owner>;
GRANT DROP PUBLIC SYNONYM TO <repository_owner>;
***********************************************************************************
The following Privileges Must be granted to SUBORDINATE USERS:
Syntax, from within SQL*Plus as the SYS user type (or use cut/edit/paste):
GRANT CONNECT, RESOURCE TO <SUBORDINATE_USER>;
IMPORTANT:
Some subordinate users may need additional privileges depending upon what utilities
they are running (e.g Import/Export from the RON)
You do not need to grant these now unless you know already that certain subordinates
users will need to be able to run these utilities
Syntax, from within SQL*Plus as the SYS user type (or use cut/edit/paste):
GRANT CREATE TABLE TO <SUBORDINATE_USER>;
GRANT CREATE VIEW TO <SUBORDINATE_USER>;
GRANT CREATE PROCEDURE TO <SUBORDINATE_USER>;
GRANT CREATE SYNONYM TO <SUBORDINATE_USER>;
GRANT CREATE SEQUENCE TO <SUBORDINATE_USER>;
GRANT SELECT ON dba_rollback_segs TO <SUBORDINATE_USER>;
GRANT SELECT ON dba_segments TO <SUBORDINATE_USER>;
***********************************************************************************
GRANT EXECUTE ON DBMS_LOCK TO owner;
GRANT EXECUTE ON DBMS_PIPE TO owner;
GRANT CREATE TABLE TO owner;
GRANT CREATE VIEW TO owner;
GRANT CREATE PROCEDURE TO owner;
GRANT CREATE SYNONYM TO owner;
GRANT CREATE SEQUENCE TO owner;
GRANT SELECT ON v_$nls_parameters TO owner WITH GRANT OPTION;
GRANT SELECT on sys.V_$PARAMETER TO owner;
GRANT SELECT ON dba_rollback_segs TO owner;
GRANT SELECT ON dba_segments TO owner;
GRANT CREATE ANY SYNONYM TO owner;
GRANT DROP ANY SYNONYM TO owner;
GRANT CREATE PUBLIC SYNONYM TO owner;
GRANT DROP PUBLIC SYNONYM TO owner;
GRANT ck_oracle_repos_owner to owner;
GRANT CONNECT, RESOURCE TO owner;
SQL> create user user65 identified by user65 default tablespace users
2 temporary tablespace temp;
User created.
SQL> GRANT CONNECT, RESOURCE TO user65;
Grant succeeded.
SQL> GRANT CREATE TABLE TO user65;
Grant succeeded.
SQL> GRANT CREATE VIEW TO user65;
Grant succeeded.
SQL> GRANT CREATE PROCEDURE TO user65;
Grant succeeded.
SQL> GRANT CREATE SYNONYM TO user65;
Grant succeeded.
SQL> GRANT CREATE SEQUENCE TO user65;
Grant succeeded.
SQL> GRANT SELECT ON dba_rollback_segs TO user65;
Grant succeeded.
SQL> GRANT SELECT ON dba_segments TO user65;
Grant succeeded.
SQL> grant create public synonym to owner;
Grant succeeded.
SQL> grant drop public synonym to owner;
Grant succeeded.
SQL> grant ck_oracle_repos_owner to owner;
Grant succeeded.
SQL> grant connect, resource to owner;
Grant succeeded.
No comments:
Post a Comment