Home » Developer & Programmer » Forms » How to retrieve records from SCOTT.EMP table, without using data block wizard?
How to retrieve records from SCOTT.EMP table, without using data block wizard? [message #557899] Sun, 17 June 2012 06:46 Go to next message
kashif_khan8281
Messages: 11
Registered: June 2012
Location: PAKISTAN
Junior Member
i want to retrieve records of empno from SCOTT.EMP talbe in form but without data block wizard using ..how .. and what logic will be in coding

DECLARE
TYPE EROC IS TABLE OF VARCHAR2(200) INDEX BY BINARY_INTEGER;
E1 EROC;
NO_EMPNO VARCHAR2(2000);
CONTR BINARY_INTEGER:=0;
BEGIN
FOR I IN (SELECT * FROM EMP) LOOP
CONTR:= CONTR+1;
E1(CONTR):=I.EMPNO;
END LOOP;
FOR J IN 1..CONTR LOOP
:V_EMPNO :=(E1(J));
END LOOP;
END;


just caling here EMPNO and :v_empno is fields on form...
Re: How to create a data block without table info [message #557901 is a reply to message #557899] Sun, 17 June 2012 09:32 Go to previous message
cookiemonster
Messages: 10853
Registered: September 2008
Location: Rainy Manchester
Senior Member
No - you want to use the datablock wizard.
You do not want to write code for this.
Never write code to do something in forms if forms can do it automatically.
Doing it yourself results in complex bug ridden code.
Previous Topic: Reduce QTY 4rm purchase tbl due to sold prodct fro sale Tbl
Next Topic: Forms not displaying in Server , but displaying in local
Goto Forum:
  


Current Time: Wed Jul 30 04:11:08 CDT 2014

Total time taken to generate the page: 0.30750 seconds