Posts

Showing posts from 2009

Forms is Very slow after installing sun JRE

-------------------------------------------------- you may face this problem that is your form becomes very slow after running it on Sun JRE instead of Oracle jinitiator to solve this problem : open basejpi.htm and add this parameter -------------------------------------------- --------------------------------------------

problem with java plugin for mozilla or firefox with forms

-------------------------------------------------- If you replaced oracle Jinitiator or JRE, you may not unable to run forms using Firefox or Mozilla To solve this problem edit formsweb.cfg jpi_mimetype=application/x-java-applet

Installing Oracle on DHCP server

-------------------------------------------------- If you are using DHCP or Your computer is not connected to a local network, You have to Follow these steps before beginning installation for Oracle Database 1-ADD Microsoft loopback adapter To install the Microsoft Loopback Adapter, follow these steps: 1-Go to Start | Control Panel | Add Hardware. 2-In the introductory dialog box, click Next. 3-Select Yes, I Have Already Connected The Hardware, and click Next. 4-Scroll to the bottom of the Installed Hardware list box, select Add A New Hardware Device, and click Next. 5-Select the Install The Hardware That I Manually Select From A List (Advanced) option, and click Next. 6-Under Hardware Types, select Network Adapters, and click Next. 7-Under Manufacturer, select Microsoft. 8-Under Network Adapter, select Microsoft Loopback Adapter. 9-Click Next twice, and click Finish. Assign a non-routable IP like"192.168.1.1" to Loopback Adapter don't assign xxx.xxx.xx.xx to network adap...

service started and Stoped

-------------------------------------------------- OracleOraHome10g service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alert service." solution Check windows/system32/drivers/etc/hosts for the hostname and IP of the server you are using for the OMS, you may need to add an entry here to resolve a DNS problem.

Installing and running oracle databse on standalone PC

-------------------------------------------------- - go to control panel - add new hardware then add new networkadapter - after adding the network adapter, go to network setting and add a static IP address - then start installation

Some Useful WIndow Conmmands

-------------------------------------------------- dxdiag to find specifications for your computer

Expand and Collapse tree

-------------------------------------------------- To Collapse tree nodes PROCEDURE collapse_tree IS vnode ftree.node; vhtree ITEM; vstate varchar2(30); BEGIN -- Search the tree identifiant -- vhtree := Find_Item('TREE_BLOCK.HTREE'); -- Search the root -- vnode := Ftree.Find_Tree_Node(vhtree, ''); -- Collapse all nodes -- WHILE NOT ftree.ID_NULL(vnode) LOOP vstate := Ftree.Get_Tree_Node_Property(vhtree, vnode, Ftree.NODE_STATE); IF vstate = Ftree.EXPANDED_NODE THEN Ftree.Set_Tree_Node_Property(vhtree, vnode, Ftree.NODE_STATE, Ftree.COLLAPSED_NODE); END IF; vnode := Ftree.Find_Tree_Node(vhtree, '', Ftree.FIND_NEXT,Ftree.NODE_LABEL, '', vnode); END LOOP; END; To Expand tree nodes : PROCEDURE explose_tree IS node ftree.node; htree ITEM; state varchar2(30); BEGIN -- Search the tree identifiant -- htree := Find_Item('BL_TREE.MENU'); -- Search the root -- ...

How to replace oracle JInitiator with other Native Java Virtual Machine?

Image
-------------------------------------------------- 1- Open forms\server\ formsweb.cfg 2- Search for [JPI] section. This section exists by default. 3- You now will add three new parameters (jpi_download_page, jpi_classid, jpi_codebase) ------------------------------------------------- [jpi] baseHTMLJInitiator=basejpi.htm [MyApplication] baseHTMLJInitiator=basejpi.htm #archive=frmall.jar,frmall_jinit.jar,hst65.jar,icons.jar,frmwebutil.jar,jacob.jar archive=frmall.jar,frmall_jinit.jar,hst65.jar,icons.jar,frmwebutil.jar,jacob.jar jpi_download_page=http://java.sun.com/products/archive/j2se/1.4.2_09/index.html # or you may use application server URL #jpi_download_page= http://iai2.iai.org.kw:7778/forms/jinitiator/us/jinit_download.htm jpi_classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93 jpi_codebase=http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0 ----------------------------------------- now copy this file " jre.exe " to the f...

how to create journalling tables and thier triggers

-------------------------------------------------- create Journalling tables: 1. go to http://iai2.iai.org.kw:7778/forms/frmservlet?config=hsd65_utilities 2. Productivity Boosters --> Data Layer --> Logical Database Design (DB.010) 3. click on Maintain journal tables 4. select the names of Tables to be journaled, then click on run 5. generate th journal tables from DB Admin and grant roles to ADMIN and APPROVE 6. you don't need to generate CAPI for the journal table from the utilities, just generate the table from DB admin and then generate Table API from the Server model. 7. in the properites of the table to be journalled , put Journal in the notes filed create journalling triggers: 1.go to http://iai2.iai.org.kw:7778/forms/frmservlet?config=hsd65_utilities 2. Productivity Boosters --> Business Logic Layer --> Rule Layer - CDM RuleFrame --> Standar rule patterns 3. click on Maintain Journalling Business Rules 4. Select the tables to be journaled, then click on run ...

What is the difference between ROWNUM and ROWID

-------------------------------------------------- This artical is Quoted from http://thinkoracle.blogspot.com/2005/10/rownum-and-rowid.html ROWNUM and ROWID Questions: How do I limit the number of rows returned by a query? How do I write a query to get the Top-N salaries from the employee table? How can I add unique, sequential numbers to an existing table? How can I differentiate between two completely identical rows? How can I find a faster way to retrieve a queried row? How can I find the last row processed in a big batch? There is one thing all these questions have in common: the answer involves either ROWNUM or ROWID. So what is ROWNUM and ROWID? First of all, both are covered in the SQL Reference, Basic Elements of Oracle SQL, Chapter 2: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540.pdf They are also both referred to as pseudo-columns. That is, they are not "real" columns that will show up when you DESC a table. They don't actually exist anywh...

Working With File Throgh WebUtill

-------------------------------------------------- Required Configuraion : By default the file transfer is disabled in webutil for a security measure. So, you have to enable File transfer configuration in webutil.cfg file. The webutil.cfg file is located in  forms\server. Open The webuil.cfg file and edit the following parameters : transfer.database.enabled=FALSE   Change To TRUE transfer.appsrv.enabled=FALSE       Change to TRUE WebUtil_File contains APIs to manipulate files and directories on the client. These Functions Or APIs are: Copy_File :  Copies a file Returns a Boolean to indicate success.  Syntax :   Webutil_File.Copy_File(SourceFileName in Varchar2 , Destination In Varchar2) Return Boolean  Example   Declare  vCopied Boolean;  Begin   vCopied :=  Webutil_File.Copy_File('C:\temp\mypic.jpg','X:\destination_folder');  If vCopied = true Then    Message('File copied Successfully');  Else   Message('Error in Copying File');  End if; Delete_File: ...

Reading From File

-------------------------------------------------- Declare   vfilename varchar2(500);   in_file   Client_Text_IO.File_Type;   linebuf   VARCHAR2(1800);  BEGIN     vfilename := client_get_file_name('c:/temp/', File_Filter=>'Comma Dialimeted Files (*.csv)|*.csv|');      in_file := client_Text_IO.Fopen(vfilename, 'r');       GO_BLOCK('Emp');      FIRST_RECORD;     LOOP     Client_Text_IO.Get_Line(in_file, linebuf);      p_output_line(linebuf);     Client_Text_IO.New_Line;      Next_record;    END LOOP;     FIRST_RECORD; EXCEPTION   WHEN no_data_found THEN     Client_Text_IO.Put_Line('Closing the file...');     Client_Text_IO.Fclose(in_file); END; ------------------------------------------------------- PROCEDURE p_output_line(p_line varchar2) IS  vLINE VARCHAR2(4000); vVALUE VARCHAR2(1000);  vCOMMA_COUNT NUMBER; vREPORT_DATE DATE; BEGIN                      vLINE := p_line;  vCOMMA_COUNT := LENGTH(vLINE)- LENGTH(REPLACE(vLINE,',','...

Read From Excel

-------------------------------------------------- DECLARE  application OLE2.OBJ_TYPE;  workbooks OLE2.OBJ_TYPE;  workbook OLE2.OBJ_TYPE;  worksheets OLE2.OBJ_TYPE;  worksheet OLE2.OBJ_TYPE;  cell OLE2.OBJ_TYPE;  args OLE2.OBJ_TYPE;  cell_value number;  BEGIN  application := OLE2.CREATE_OBJ('Excel.Application');  ole2.set_property(application,'Visible','true');  workbooks := OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');  args := OLE2.CREATE_ARGLIST;  ole2.add_arg(args,'c:\test.xls');  workbook := ole2.GET_OBJ_PROPERTY(workbooks,'Open',args);  ole2.destroy_arglist(args); worksheets := ole2.GET_OBJ_PROPERTY(workbook, 'Worksheets');  worksheet := OLE2.GET_OBJ_PROPERTY(application,'activesheet'); for cols in 1..4 loop  -- columns for rows_index in 1..3 loop  -- rows args:= ole2.create_arglist;  ole2.add_arg(args, rows_index);  ole2.add_arg(args, cols);  cell:= ole2.get_obj_property(worksheet, 'Cells', args);  ole2....

ora-12638 credential retrieval failed

--------------------------------------------------  check the sqlnet.ora file. Change the following entry and try, this will work. Original Entry - SQLNET.AUTHENTICATION_SERVICES= (NTS) Modified Entry - SQLNET.AUTHENTICATION_SERVICES= (NONE)

How to Create your First Bean

hi This documnent describs how to create your first bean First Bean

Developing powerful Oracle Business Intelligence Beans

Image
Prerequisites Oracle Forms 10g Rel. 2 • • • Forms_Demos_10gr2.zip   Installation (1) Download from OTN: Forms_Demos_10gr2.zip • • download.oracle.com/otndocs/demos/Forms_Demos_10gr2.zip – • Unzip it into an example-Folder of your choice • • Copy FormsGraph.jar into \forms\java   Source-Codes PROCEDURE BT_Compare IS   vItem                VARCHAR2(200) := :SYSTEM.Cursor_Item;   vGrafik              ITEM           := FIND_ITEM (Const_lokal.itm_Chart);   vData                VARCHAR2(200); BEGIN   -- Initialize Graph   SET_CUSTOM_PROPERTY (vGrafik, 1, 'CLEAR_GRAPH', '');   GO_BLOCK ('UMSATZUEBERSICHT');   FIRST_RECORD;   LOOP     vData := :UMSATZUEBERSICHT.Ums_Geschaeftsbereich || ',' ||              :UMSATZUEBERSICHT.Ums_Jahr || ',' ||              :UMSATZUEBERSICHT.Ums_Umsatz;     SET_CUSTOM_PROPERTY(vGrafik, 1, 'ADD_ROWDATA', vData);     IF :SYSTEM.Last_Record = 'TRUE' THEN...

notify form

to notify form from outside http://www.4shared.com/file/88670510/ca591b00/notifyForm.html

Output query to text file

I amde this demo to output the result of a query to file http://www.4shared.com/file/88667703/e978be9c/DBToFile.html

how to make print screen from your form

Form and jar file --------------------------------------------------------------- package screen; import java.awt.AWTException; import java.awt.Robot; import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.*; import javax.imageio.ImageIO; public class ScreenCapture { public void printScreen() throws AWTException, IOException { // capture the whole screen BufferedImage screencapture = new Robot().createScreenCapture( new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()) ); // Save as JPEG File file = new File("screencapture.jpg"); ImageIO.write(screencapture, "jpg", file); // Save as PNG // File file = new File("screencapture.png"); // ImageIO.write(screencapture, "png", file); } } --------------------------------------------------------------------------- -- form builder implementation ----------------------------------------...