Tuesday, December 14, 2010

Oracle Apps New Custom Form

http://apps2fusion.com/apps/21-technical/46-a-new-custom-form-in-oracle-apps

oracle Forms look and feel

.http://fdegrelle.over-blog.com/30-categorie-265996.htmlhttp://fdegrelle.over-blog.com/ext/http://sheikyerbouti.developpez.com/forms-pjc-bean/LAF/doc/new.htm

How to change HOST NAME/IP in oracle application server

http://download.oracle.com/docs/cd/B14099_19/core.1012/b13995/host.htm#CIHFGICJ

How to aviod locks

Declareis_locked boolean := false;dummy VARCHAR2(2);BeginBeginSelect null INTO dummy from mytablewhere rowid = :myblock.rowidfor update nowait;exception when Others thenIf sqlcode = -00054 Thenis_locked := True;End If; end;IF is_locked thenShowmessage('Another user is updating this record. Try again later.');raise form_trigger_failure;ElseLOCK_RECORD;If Not Form_success ThenRAISE form_trigger_failure;End If;End if;End;

http://forums.oracle.com/forums/thread.jspa?threadID=322077

Sunday, October 17, 2010

How to handler special characters

CREATE OR REPLACE FUNCTION strip_special_character ( in_string IN varchar2,in_chars IN varchar2 DEFAULT NULL) RETURN varchar2 IS
TAB CHAR(1) := chr(9);
double_quote char( 1 ) := chr(34);
single_quote char( 1 ) := chr(39);
mask varchar2( 80 ) := '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
v_special_chars varchar2( 80 ) := '`~^\'double_quotesingle_quotetab;
begin
IF in_chars IS NOT NULL then
v_special_chars := in_chars;
end
IF; RETURN translate( in_string, mask v_special_chars, mask );
exception when others then RETURN in_string;
end strip_special_character;

How to remove Unnecessary Spaces

CREATE FUNCTION remove_unwanted_spaces( in_value IN VARCHAR2 )
RETURN VARCHAR2
AS
v_result VARCHAR2(32767);
BEGIN
IF( in_value IS NOT NULL ) THEN
FOR i IN 1 .. ( LENGTH(in_value) - 1 ) LOOP
IF( SUBSTR( in_value, i, 2 ) <> ' ' ) THEN
v_result := v_result SUBSTR( in_value, i, 1 );
END IF;
END LOOP;
v_result := v_result SUBSTR( in_value, -1 );
END IF;
RETURN v_result;
END;