Collection type supported in Oracle Forms Forms [32 Bit] Version 6.0.8.11.3
Hi
I am trying to call this from forms.
I am getting error no data found whenever this calles IF condition but from backend if run it from a script it works fine.
So I was thinking whether Forms PL/SQL version supports collection types.
I am using Forms [32 Bit] Version 6.0.8.11.3 (Production) for Oracle Application 11.5.10 version.
IF (p_emp_ids.COUNT > 0) THEN
FOR r IN v_emp_ids.FIRST..v_pkg_ids.LAST LOOP
Thanks in Advance
Is it just a a typo that the IF is on P_emp_ids and the loop is on V_em_ids?
However: the NO_DATA_FOUND exception suggests that you may be falling down a crack in your collection. If you have a missing element between FIRST and LAST you will get a no_data_found. Suppose these elements are there:
(1), (2). (3), (5), (6)
You will start at FIRST (1) and finish at LAST (6). But your loop on R will try to find the element at (4). Which isn't there. Oops...
To prove that's what's happening, you can wrap the inside of the loop with an exception handler
BEGIN
do the access to v_emp_ids(r)
EXCEPTION
WHEN NO_DATA_FOUND then (log a message with the value if R in it)
END;If you want to walk a collection with gaps (a "sparse" collection), this is the way:
DECLARE
r pls_integer;
BEGIN
r := v_empids.FIRST
LOOP
EXIT when r IS NULL;
do the business on v_empids(r);
r := v_empids(r).NEXT;
END LOOP;Now, why didn't this work in Forms, but did on the server? Possible reasons:
- your back end script was set up differently - so you had a dense collection (no gaps)
- Client side PL/SQL is different from server side (is it still version 1.x?)
HTH
Regards Nigel
Message was edited by:
nthomas
Similar Messages
-
Collection type support in Forms version 6.0.8.11.3
Hi
I am trying to call this from forms.
I am getting error no data found whenever this calls IF condition but from backend if run it from a script it works fine.
So I was thinking whether Forms PL/SQL version supports collection types.
I am using Forms [32 Bit] Version 6.0.8.11.3 (Production).
IF (p_emp_ids.COUNT > 0) THEN
FOR r IN v_emp_ids.FIRST..v_pkg_ids.LAST LOOP
Thanks in AdvanceIs it just a a typo that the IF is on P_emp_ids and the loop is on V_em_ids?
However: the NO_DATA_FOUND exception suggests that you may be falling down a crack in your collection. If you have a missing element between FIRST and LAST you will get a no_data_found. Suppose these elements are there:
(1), (2). (3), (5), (6)
You will start at FIRST (1) and finish at LAST (6). But your loop on R will try to find the element at (4). Which isn't there. Oops...
To prove that's what's happening, you can wrap the inside of the loop with an exception handler
BEGIN
do the access to v_emp_ids(r)
EXCEPTION
WHEN NO_DATA_FOUND then (log a message with the value if R in it)
END;If you want to walk a collection with gaps (a "sparse" collection), this is the way:
DECLARE
r pls_integer;
BEGIN
r := v_empids.FIRST
LOOP
EXIT when r IS NULL;
do the business on v_empids(r);
r := v_empids(r).NEXT;
END LOOP;Now, why didn't this work in Forms, but did on the server? Possible reasons:
- your back end script was set up differently - so you had a dense collection (no gaps)
- Client side PL/SQL is different from server side (is it still version 1.x?)
HTH
Regards Nigel
Message was edited by:
nthomas -
Oracle Developer Suite 32 Bit Version 10.1.2.0.2 Configuration issues
Hi,
I have installed Oracle Developer Suite 32 Bit Version 10.1.2.0.2 (Production) on windows xp sp-2 in a standalone machine.
The following Steps i have followed:
1.Oracle Developer Suite Installed
2.FORMS_PATH ,REPORTS_PATH and UI_ICON has been set in both Registry and default.env
My Application Folder setup is as follows :
D:\iAFRES\APPLICATION\FORMS
\MENUS
\REPORTS
\ICONS
Accordingly i have made the registry entries.
After doing all the above activities i am not able to show the icons ,run reports from web
.Please tell me what to do to resolve the issue and provide me the steps/documents for Application Deployment in Oracle 10g Developer Suite for Development purpose.
Thanks
Dhabashi
check out the following links.
How to create jar for icons
http://www.oracle.com/technology/products/forms/pdf/10g/frmwebshowdoc_rep.pdf
If its Correct/Helpful Please Mark it.Thanks
sarah
Edited by: S@R@h on Oct 29, 2009 1:23 AM -
Which browser support for Oracle 10g forms (using window7 ultimate 32bit)
sir my 10g forms show pluginn error using any BROWSER .. also netscape navigator 9.0 for window 7 ultimate 32bit
PLZ solve my problem anyone..
i shall b very thankfullllllplz solve my problem any one an which browser i will use for for window 7 32bit ????>
Please take a look at the Client Certification. It lists all of the browsers that are certified for the Java version you are using. Also, you will need to modify your configuration to correctly list the Java Plug-in version you have installed. For information on how to configure the JPI, take a look at Oracle 10gR2 Forms Services – Using Sun's Java Plug-in.
Craig... -
Advanced JavaBean support in Oracle 9i Forms
I am able to use javabean components in 9i forms,i am able to access methods properly.I need to change the look and feel (like color,font etc).The methods in the bean take Color,Font etc as parameters. How can i use the FBEAN_INVOKE method with parameters(like Color,Font) which are other than the basic datatypes(varchar2,number,boolean).
Hello Frank,
I was thinking the same but while going through the documentation related to 9i forms i came across folowing description.I have copied it from the 9inewfeatures.pdf,see below.
Using FBEAN, you can programmatically register a JavaBean at runtime, get and
set properties and execute methods, all from within PL/SQL, without having to
write any extra Java code! Even if your JavaBean is complex and uses data types
that cannot readily be translated from the basic PL/SQL types, the FBEAN
interface is extensible using Java and can be tailored to your requirements.
Now after going through this i tried to find out how it can be tailored for our requirements.but i could not find any explaination anywhere.
I posted he query thinking if any one who has worked on this earlier, could guide me ,it would be realy nice.
thanks for the reply
Regards
Sachin -
Issue with use of collection type attibutes of oracle custom objects in BC4
Hi There,
Just see the simulation, it seems to be an issue with BC4J/OC4j when we have an attribute in the view object mapped to a database column that is of type collection of custom oracle objects.
1- I have a oracle type Quantity that is defined to contain 2 numbers
2- I have a oracle collection QuantityList that is a collection of Quantity objects.
3- I have a table defined as :
CREATE TABLE ANU_TEST_QUANTITYLIST
ID NUMBER,
USR_DATA QUANTITYLIST
NESTED TABLE USR_DATA STORE AS ANU_QUANTITYLIST;4- Now I try to select the id and usr_data column of this table through the VAnuTestQuantityList view.
5- It throws the following exception:
## Detail 0 ##
java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)I try using the "Business components from tables" wizard to create a new EO, VO, and AM related to the ANU_TEST_QUANTITYLIST and it works fine for me. You'll see that JDeveloper creates you a custom Quantitylist domain object as part of this process.
If you are making programmatic use of the oracle.sql.STRUCT then you will see this error in three-tier.
Use the oracle.jbo.domain.Struct instead. -
Oracle 8i with 32 bit version and Memory Window on HPUX11i
Is there a concern running Oracle 8i with 32bit on HPUX 11i ?
What's about memory window support ? Will Oracle support this configuration ?> Could you confirm that there is still memory address space limitations due to the 32-bit SAP kernel?
Yes.
>> It is the SAP Kernel that determines the addressable operating system limit for R/3 extended memory under Windows NT?
On a 64bit OS it is a bit different, effectively you can use 4 GB per workprocess.
> Do I still need to set the 3GB option on the system to allocate more than 2.5GB of SAP buffers and extended memory space?
No.
Markus -
(8I) COLLECTION TYPE 변경 방법
제품 : SQL*PLUS
작성날짜 : 1999-05-12
COLLECTION TYPE 변경 방법
=========================
collection type은 attribute나 column의 데이타 타입으로
사용된다. 이전에 정의한 collection type의 property를 변경해야
하는 경우가 종종 발생하게 되는데 그 작업이 간단하지 않다.
ALTER TYPE문은 spec이나 body를 재컴파일하거나, member를 추가
하는 경우에는 사용할 수 있지만 현재 collection의 property를
바꿀수는 없다. 만약 변경하려한다면 다음 에러가 날 것이다.
ORA-22319: type attribute information altered in ALTER TYPE
collection의 property 를 변경하기 위해서는 collection을 drop
한 후, 다시 만들어야 하는데 참조하는 오브젝트가 존재하는 경우
dependency 문제로 인해 collection type을 drop 할 수도 없다.
ORA-02303: cannot drop or replace a type with type
or table dependents
즉, Oracle 8i 이전에는 collection의 attribute를 변경하려면
parent table과 collection type을 모두 drop한 후, 재생성
해야만 했다.
그러나 Oracle 8i new feature인 ALTER TABLE DROP COLUM문을
이용하여 parent table을 drop하지 않고도 collection type의
attribute를 변경할 수 있게 되었다.
다음은 parent table을 drop하지 않고 collection (nested table)을
변경하는 예제이다.
SQL> /* object type 선언 */
SQL> create type object_type as object (
col1 number,
col2 varchar2(20));
SQL> /* nested table type 선언*/
SQL> create type object_ntable as table of object_type;
SQL> /* parent table 생성 */
SQL> create table master (
col1 number primary key,
col2_list object_ntable)
nested table col2_list store as master_col2;
SQL> insert into master values (1,
object_ntable(object_type(1,'1'),
object_type(1,'2'),
object_type(1,'3')));
SQL> insert into master values (2,
object_ntable(object_type(2,'1'),
object_type(2,'2'),
object_type(2,'3')));
SQL> commit;
1. 기존에 저장된 collection data를 임시 table에 저장.
SQL> create table temp_detail as
select m.col1 "MASTER_COL1", n.col1, n.col2
from master m, table(m.col2_list) n;
SQL> select * from temp_detail;
MASTER_COL1 COL1 COL2
1 1 1
1 1 2
1 1 3
2 2 1
2 2 2
2 2 3
2. parent table의 nested table column을 drop 하기
3. nested table type을 drop하기.
4. object type을 drop하기.
SQL> alter table master drop column col2_list;
SQL> drop type object_ntable;
SQL> drop type object_type;
5. attribute을 변경한 object type을 재생성하기
6. nested table type을 재생성하기.
SQL> create type object_type as object (
col1 number,
col2 varchar2(30));
SQL> create type object_ntable as table of object_type;
7. parent table에 nested table column을 추가하기.
SQL> alter table master add (col2_list object_ntable)
nested table col2_list store as master_col2;
8. 임시 테이블에 저장했던 data를 nested table에 저장하기.
SQL> update master m
set col2_list = (cast(multiset(
select col1, col2
from temp_detail
where master_col1 = m.col1)
as object_ntable))
where col1 in
(select distinct master_col1 from temp_detail);
SQL> select * from master;
COL1
COL2_LIST(COL1, COL2)
1
OBJECT_NTABLE(OBJECT_TYPE(1, '1'), OBJECT_TYPE(1, '2'), OBJECT_TYPE(1, '3'))
2
OBJECT_NTABLE(OBJECT_TYPE(2, '1'), OBJECT_TYPE(2, '2'), OBJECT_TYPE(2, '3'))
* TABLE(), DROP COLUMN 절은 Oracle 8i new features 이다.each member of the insert must be a collection, hope this eample helps;
CREATE OR REPLACE PROCEDURE fast_way IS
TYPE parent_rec IS RECORD (
part_num dbms_sql.number_table,
part_name dbms_sql.varchar2_table);
p_rec parent_rec;
CURSOR c IS
SELECT part_num, part_name
FROM parent;
l_done BOOLEAN;
BEGIN
OPEN c;
LOOP
FETCH c BULK COLLECT INTO p_rec.part_num, p_rec.part_name
LIMIT 500;
l_done := c%notfound;
FORALL i IN 1 .. p_rec.part_num.COUNT
INSERT INTO child
(part_num, part_name)
VALUES
(p_rec.part_num(i), p_rec.part_name(i));
EXIT WHEN (l_done);
END LOOP;
COMMIT;
CLOSE c;
END fast_way;
/ -
Hellow All.
Can we use Forms 10g [32 Bit] Version 10.1.2.0.2 (Production) Application in Forms[32 Bit] 10g R1?
Is it Possible?
Any help would be greatly appreciated.I agree with Andreas
if you are using application server 10g r2 so the forms and reports runtime version is diffirent from oracle 10g 9.0.4 you should have the same developer suit version at your client pc example if you have oracle as 10g 9.0.4 your developer suite at your pc should be 9.0.4 -
Which are the document types supported by Portal's Search
I'd like to know which are the document types supported by Oracle Ultrasearch / Oracle Portal that looks for the information inside the document.
Thank you very much,
RegardsThe document types supported are the same as those supported by Oracle Text.
It depends on the database version as to what document types are supported. Therefore if you check your database information, Text Reference, there is a Supported Document Formats section which should give you the information you need. -
ORA-06531 reference to uninitialized collection in oracle 6i form
Hello,
I am importing data from excel to database table with column mapping (oracle 6i forms)using ole2 package, then calling package
which is having a procedure. while executing the package procedure,
I am getting error 'ora-06531 reference to uninitialized collection' i.e. before for i in 1..in_lData.count
I am working on it but still not getting any solution. There is no problem in coding my form gets compiled but at run time i am getting this error.
And while debugging, data fetched from ole2 package is not passed to for loop of the procedure.
(first of all i am calling ole 2 package, then from ole2 package i am calling my package. procedure)
please help me. My code is this
------------------------------------------------------Ole 2 Package begins-----------------------------------------------------------------
PROCEDURE get_excel IS
APPLICATION OLE2.OBJ_TYPE;
WORKBOOKS OLE2.OBJ_TYPE;
WORKBOOK OLE2.OBJ_TYPE;
WORKSHEETS OLE2.OBJ_TYPE;
WORKSHEET OLE2.OBJ_TYPE;
CELL OLE2.OBJ_TYPE;
CTR NUMBER(12);
COLS NUMBER(2);
CELLVALUE VARCHAR2(89);
C_ROUTE VARCHAR2(255);
V_ROUTE VARCHAR2(1000);
C_TRNDATE VARCHAR2(255);
V_TRNDATE VARCHAR2(1000);
C_TTIME VARCHAR2(255);
V_TTIME VARCHAR2(1000);
C_TID VARCHAR2(255);
V_TID VARCHAR2(1000);
FILENAME VARCHAR2(500);
v_path varchar2(1000):=:path;
ARGS OLE2.OBJ_TYPE;
tDataList PK_EXCEL_TO_DB.tDataList;
BEGIN
:progress:='Please wait...';
SYNCHRONIZE;
--------------INITIATE EXCEL APPLICATION---------------------------
filename := V_PATH;--GET_FILE_NAME('c:\', File_Filter=>'Excel Files (*.xls)|*.xls|'); -- to pick the file
APPLICATION := OLE2.CREATE_OBJ('EXCEL.APPLICATION');
OLE2.SET_PROPERTY(APPLICATION,'VISIBLE','FALSE');
----------------GET WORKBOOKS FROM EXCEL APPLICATION---------------
WORKBOOKS := OLE2.GET_OBJ_PROPERTY(APPLICATION, 'WORKBOOKS');
----------------OPEN REQUIRED WORKBOOK-----------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS, FILENAME);
WORKBOOK := OLE2.GET_OBJ_PROPERTY(WORKBOOKS,'OPEN',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------OPEN REQUIRED WORKSHEET---------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,'Sheet1');
WORKSHEET := OLE2.GET_OBJ_PROPERTY (WORKBOOK,'WORKSHEETS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------GET CELL VALUE-------------------------------------
ctr := 2; --row number
cols := 1; -- column number
FIRST_RECORD;
LOOP
-----------------------COLUMN1-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS); --COLS
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
-----------------------COLUMN2-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
-----------------------COLUMN3-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
-----------------------COLUMN4-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
PK_EXCEL_TO_DB.PR_DO_INSERT(tDataList);
EXIT WHEN length(V_Route) = 0 or length(V_Route) is null;
ctr := ctr + 1;
cols := 1;
i_ldata := PK_EXCEL_TO_DB.tDatalist(); --already define
PK_EXCEL_TO_DB.PR_DO_INSERT(tDataList);
END LOOP;
:progress:='EXCEL READING IS DONE...';
----------------CLOSE THE EXCEL SHEET AFTER READING--------------
OLE2.INVOKE(APPLICATION,'QUIT');
-----------------RELEASE ALL OBJECTS
OLE2.RELEASE_OBJ(CELL);
OLE2.RELEASE_OBJ(WORKSHEET);
OLE2.RELEASE_OBJ(WORKBOOK);
OLE2.RELEASE_OBJ(WORKBOOKS);
OLE2.RELEASE_OBJ(APPLICATION);
:PROGRESS := 'DATA INSERTED INTO THE TABLE '; SYNCHRONIZE;
SYNCHRONIZE;
exception
WHEN OTHERS THEN
MESSAGE(sqlerrm);
END;
----------------------------------------------------------------------------------------OLE2 PACKAGE ENDS-------------------------------------------------
------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE SPECIFICATION---------------------------------------------
PACKAGE PK_EXCEL_TO_DB IS
TYPE tKeyValue IS RECORD (
CROUTE VARCHAR2(255),
VROUTE VARCHAR2(1000),
CTRNDATE VARCHAR2(255),
VTRNDATE VARCHAR2(1000),
CTTIME VARCHAR2(255),
VTTIME VARCHAR2(1000),
CTID VARCHAR2(255),
VTID VARCHAR2(1000));
TYPE tDataList IS TABLE OF tKeyValue;
PROCEDURE PR_DO_INSERT(i_lData IN tDataList);
END;
-----------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE BODY-----------------------------------------------------
PACKAGE BODY PK_EXCEL_TO_DB IS
PROCEDURE PR_DO_INSERT(i_lData IN tDataList) IS
CC_ROUTE VARCHAR2(255);
VV_ROUTE VARCHAR2(1000);
CC_TRNDATE VARCHAR2(255);
VV_TRNDATE VARCHAR2(1000);
CC_TTIME VARCHAR2(255);
VV_TTIME VARCHAR2(1000);
CC_TID VARCHAR2(255);
VV_TID VARCHAR2(1000);
BEGIN
FOR i IN 1..i_lData.count
LOOP
CC_ROUTE:=CC_ROUTE || ',' || i_ldata(i).CROUTE;
VV_ROUTE:=VV_ROUTE|| ',''' || i_ldata(i).VROUTE || '''';
CC_TRNDATE :=CC_TRNDATE || ',' || i_ldata(i).CTRNDATE ;
VV_TRNDATE :=VV_TRNDATE || ',''' || i_ldata(i).VTRNDATE || '''';
CC_TTIME :=CC_TTIME || ',' || i_ldata(i).CTTIME ;
VV_TTIME :=VV_TTIME || ',''' || i_ldata(i).VTTIME || '''';
CC_TID :=CC_TID || ',' || i_ldata(i).CTID ;
VV_TID :=VV_TID || ',''' || i_ldata(i).VTID|| '''';
END LOOP;
--EXECUTE IMMEDIATE
FORMS_DDL('INSERT INTO TEMP2 (' || SUBSTR(CC_ROUTE, 2) || ' ' ||
SUBSTR(CC_TRNDATE, 2) || ' ' ||
SUBSTR(CC_TTIME, 2) || '' ||
SUBSTR(CC_TID, 2) || ')
VALUES (' || SUBSTR(VV_ROUTE,2) || ' ' ||
SUBSTR(VV_TRNDATE,2) || '' ||
SUBSTR(VV_TTIME,2) || ' ' ||
SUBSTR(VV_TID,2)|| ')');
commit;
END;
END;
------------------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE BODY ENDS--------------------------------------
Thank You
Sameer.Hii Andreas Weiden,
Sorry for replying late. I am very thankful to Francois and your for your suggestion. I've gone through the documentation of collection and finally i got the solution.
But I am unable to insert rercord to the table. Values are passed to the procedure, i am able to see the values while debugging and i get the message
'DATA INSERTED INTO THE TABLE' but when i check it with sql, the table is empty. I've tried commit and standard.commit, but it doesn't works. My modified code is given below.
PROCEDURE get_excel IS
APPLICATION OLE2.OBJ_TYPE;
WORKBOOKS OLE2.OBJ_TYPE;
WORKBOOK OLE2.OBJ_TYPE;
WORKSHEETS OLE2.OBJ_TYPE;
WORKSHEET OLE2.OBJ_TYPE;
CELL OLE2.OBJ_TYPE;
CTR NUMBER(12);
COLS NUMBER(2);
CELLVALUE VARCHAR2(89);
C_ROUTE VARCHAR2(255);
V_ROUTE VARCHAR2(1000);
C_TRNDATE VARCHAR2(255);
V_TRNDATE VARCHAR2(1000);
C_TTIME VARCHAR2(255);
V_TTIME VARCHAR2(1000);
C_TID VARCHAR2(255);
V_TID VARCHAR2(1000);
FILENAME VARCHAR2(500);
v_path varchar2(1000):=:path;
ARGS OLE2.OBJ_TYPE;
i_ldata PK_EXCEL_TO_DB.tDataList:=PK_EXCEL_TO_DB.tDataList();
tDataList PK_EXCEL_TO_DB.tDataList;
BEGIN
:progress:='Please wait...';
SYNCHRONIZE;
--------------INITIATE EXCEL APPLICATION---------------------------
filename := V_PATH;--GET_FILE_NAME('c:\', File_Filter=>'Excel Files (*.xls)|*.xls|'); -- to pick the file
APPLICATION := OLE2.CREATE_OBJ('EXCEL.APPLICATION');
OLE2.SET_PROPERTY(APPLICATION,'VISIBLE','FALSE');
----------------GET WORKBOOKS FROM EXCEL APPLICATION---------------
WORKBOOKS := OLE2.GET_OBJ_PROPERTY(APPLICATION, 'WORKBOOKS');
----------------OPEN REQUIRED WORKBOOK-----------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS, FILENAME);
WORKBOOK := OLE2.GET_OBJ_PROPERTY(WORKBOOKS,'OPEN',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------OPEN REQUIRED WORKSHEET---------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,'Sheet1');
WORKSHEET := OLE2.GET_OBJ_PROPERTY (WORKBOOK,'WORKSHEETS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------GET CELL VALUE-------------------------------------
ctr := 2; --row number
cols := 1; -- column number
FIRST_RECORD;
LOOP
i_ldata.extend(ctr);
i_ldata.extend(cols);
--tDataList:=PK_EXCEL_TO_DB.tDataList();
-----------------------COLUMN1-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS); --COLS
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CROUTE:=C_ROUTE;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).VROUTE:=V_ROUTE;
-----------------------COLUMN2-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CTRNDATE:=C_TRNDATE;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).vtrndate:=v_trndate;
-----------------------COLUMN3-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CTTIME:=C_TTIME;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).vttime:=v_ttime;
-----------------------COLUMN4-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CTID:=C_TID;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).vtid:=v_tid;
PK_EXCEL_TO_DB.PR_DO_INSERT(i_ldata);
-- i_ldata := PK_EXCEL_TO_DB.tDatalist();
EXIT WHEN length(V_Route) = 0 or length(V_Route) is null;
ctr := ctr + 1;
cols := 1;
END LOOP;
:progress:='EXCEL READING IS DONE...';
----------------CLOSE THE EXCEL SHEET AFTER READING--------------
OLE2.INVOKE(APPLICATION,'QUIT');
-----------------RELEASE ALL OBJECTS
OLE2.RELEASE_OBJ(CELL);
OLE2.RELEASE_OBJ(WORKSHEET);
OLE2.RELEASE_OBJ(WORKBOOK);
OLE2.RELEASE_OBJ(WORKBOOKS);
OLE2.RELEASE_OBJ(APPLICATION);
:PROGRESS := 'DATA INSERTED INTO THE TABLE '; SYNCHRONIZE;
SYNCHRONIZE;
exception
WHEN OTHERS THEN
MESSAGE(sqlerrm);
END;Package specification and package body is
PACKAGE PK_EXCEL_TO_DB IS
TYPE tKeyValue IS RECORD (
CROUTE VARCHAR2(255),
VROUTE VARCHAR2(1000),
CTRNDATE VARCHAR2(255),
VTRNDATE VARCHAR2(1000),
CTTIME VARCHAR2(255),
VTTIME VARCHAR2(1000),
CTID VARCHAR2(255),
VTID VARCHAR2(1000));
TYPE tDataList IS TABLE OF tKeyValue;
PROCEDURE PR_DO_INSERT(i_lData IN tDataList);
END;
-----------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE BODY-----------------------------------------------------
PACKAGE BODY PK_EXCEL_TO_DB IS
PROCEDURE PR_DO_INSERT(i_lData IN tDataList) IS
CC_ROUTE VARCHAR2(255);
VV_ROUTE VARCHAR2(1000);
CC_TRNDATE VARCHAR2(255);
VV_TRNDATE VARCHAR2(1000);
CC_TTIME VARCHAR2(255);
VV_TTIME VARCHAR2(1000);
CC_TID VARCHAR2(255);
VV_TID VARCHAR2(1000);
BEGIN
FOR i IN 1..i_lData.count
LOOP
CC_ROUTE:=CC_ROUTE || ',' || i_ldata(i).CROUTE;
VV_ROUTE:=VV_ROUTE|| ',''' || i_ldata(i).VROUTE || '''';
CC_TRNDATE :=CC_TRNDATE || ',' || i_ldata(i).CTRNDATE ;
VV_TRNDATE :=VV_TRNDATE || ',''' || i_ldata(i).VTRNDATE || '''';
CC_TTIME :=CC_TTIME || ',' || i_ldata(i).CTTIME ;
VV_TTIME :=VV_TTIME || ',''' || i_ldata(i).VTTIME || '''';
CC_TID :=CC_TID || ',' || i_ldata(i).CTID ;
VV_TID :=VV_TID || ',''' || i_ldata(i).VTID|| '''';
END LOOP;
FORMS_DDL('INSERT INTO TEMP2 (' || SUBSTR(CC_ROUTE, 2) || ' ' ||
SUBSTR(CC_TRNDATE, 2) || ' ' ||
SUBSTR(CC_TTIME, 2) || '' ||
SUBSTR(CC_TID, 2) || ')
VALUES (' || SUBSTR(VV_ROUTE,2) || ' ' ||
SUBSTR(VV_TRNDATE,2) || '' ||
SUBSTR(VV_TTIME,2) || ' ' ||
SUBSTR(VV_TID,2)|| ')');
--standard.commit;
commit;
END;
END;Thanks
Sam
Edited by: sam8682 on May 13, 2013 2:35 PM -
Urdu support in Oracle Forms 9i
Requirement:
============
We have an application in Oracle Forms & Report 9i Rel 2 and Database 9i Rel 2.
There is a client requirement to provide Urdu support in this application.
We have to enter Urdu data in few forms and print it in PDF reports.
Problem:
===========
We created new database with AL32UTF8 Character Set with same National
Character Set for Unicode support.
Developed a form and report on a table with NVARCHAR2 data type.
Edited nls_lang entries in Registry to AMERICAN_AMERICA.AL32.UTF8
Installed Urdu Support in WinXp
Database stores and retrieves Urdu and displays Oracle SQL Developer.
Oracle form stores/retrieves Urdu characters but it fails to type
complete words and sentences.
On typing 2nd, 3rd characters of a words all characters position mix up
randomly and produce garbage.
Oracle report don't show Urdu characters in run-time but it shows the
same in Report Builder.
Further more, Our group of applications works in Materialized View Replication environment [5-6 applications consolidate data at a Central Database]. If we change Character Set of one application's database to Unicode then is it must to apply the change in all databases of replication group.
Please suggest if Oracle IDS 9i or 10g provides support for Urdu. If yes then please suggest solution of the above stated problems.
Looking forward for your quick response.You would have much more possibilities to have your question answered if you posted it in Oracle Forms forum.....
Greetings,
Simon -
Using scatter graph type in oracle 10g forms using bi beans
hi.. how i can use scatter graph type in oracle 10g using bi beans..
it seems scatter graph is supported in 10g but it doesnt work at all..
i used to use oracle graphics builder in oracle 6i forms,now i need to convert all my old graphs to 10g forms..the line,bar and pie it work very well but the scatter didnt work..
so please if anyone know how to use it please tell me.. and what versions of bi beans support the scatter graph type
thanks.
u can email me in
[email protected]Hi,
What version of Oracle Forms are you using? If it is 10.1.2.0.2 (10g R2 Phase 2) then the BI Beans version should be 10.1.2.1 (3.2.2.0.24.2).
When you run a Graph, do you see any version numbers?
Regardless of the version, scatter graph should work. What kind of errors are you getting?
When you install BI Beans in JDeveloper, you get access to BI Beans Help. Go to the following topic for setting up data for a scatter graph:
Help -> Building Applications with BI Beans -> Presenting Data in Graphs -> Specifying Data for Graphs
Did you try posting your question on the Oracle Forms forum?
BI Beans PM -
Oracle Report and Oracle Form Version supported by Oracle Enterprise 10gR2
Dear support,
Would you please advise me on the version of the following product supported by Oracle Enterprise Edition 10gR2?
1. Oracle Report
2. Oracle Form
Thanks.
Kan FokHi,
I think Reports 6i has the option to create character delimited output, which can be used for Excel imports. In Reports 9i the ability to add a mime type that opens Excel directly was added
Frank -
Kindly suggest oracle automation testing tools supporting oracle 10g forms
Hi,
We would like to automate oracle 10g forms in our company. kindly suggest oracle automation tools supporting oracle 10g forms other than OATS.
If only OATS tool is available in Oracle, please suggest user guide for OATS.
Regards,
SairamHi Sairam,
You can find OATS docs in OATS installation package itself. You can find separate pdf files for each OATS product(OpenScript Programmer Preference, OFT, OLT, OTM, Administrator etc).
Regards,
Deepu M
Maybe you are looking for
-
Hello, After upgrading to 10.7.0, I got problem with 5.1 digital out sound on my MBP Early 2011. Then, I decided to upgrade to 10.7.2 for developer to make the sound working again. But what a pity, the 5.1 digital out sound did not work either. Now,
-
How do I transfer the music from my phone to my iTunes on my Mac?
I recently tried to download OS X Mavericks and it totally messed up my computer. I fixed it but everything on my laptop is gone )): I really want all of my music back! The music is on my iPhone 5, how do I transfer it into my iTunes library? Not all
-
Why can't i use the double-tap feature on my inspire 4g
okay on certain websites like www.tchek.com it doesn't let me log in and enter my stuff in the field like i am now in this post question box. and i cant click on anything and i can zoom in or out. this website work great on Atrix. i got this phone ju
-
How to include the Age and Age operator in Dashboard prompts
I wouild like to create two new dashboard prompts 'Age' and 'Age Operator' both as drop downs. The 'Age' prompt should have the values from 1-100 as dropdown for the users to select from. The 'Age Operator' should have the values <, <=, >, >=, = as d
-
Acrobat forms field description
Hello, I'm new to acrobat and I want to know two things. I'm making a form and I want to see the description in every field of my form to people know what to put there, if I let the mouse over it says the description, but I want to show there everyti