Home » Developer & Programmer » Forms » cursor Example (10g)
cursor Example [message #411841] Tue, 07 July 2009 02:29 Go to next message
annu-agi
Messages: 238
Registered: July 2005
Location: Karachi
Senior Member

hi experts

i just want to populate all the employess who belongs to dept 10 populated in tabular block of emp through cursor. I have design the form and write coding against one button. but it shows error ora-01001 ( Invalid Cursor)


my coding is
declare
	v_emp emp.ename%type;
cursor c1 is select ename from emp where deptno=10;
begin
	loop 
		fetch c1 into v_emp;
		exit when c1%notfound;
		:emp.ename:=v_emp;
		next_record;
	end loop;
	
end;

for refernece check form

regards

anwer




  • Attachment: emp3.fmb
    (Size: 48.00KB, Downloaded 1073 times)
Re: cursor Example [message #411846 is a reply to message #411841] Tue, 07 July 2009 02:38 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Do you want to search a record in Tabulor Style Form ?


If Yes

Then use Default_where option

Please Search the board before posting your Question this question already exist


Regards

Shahzaib ismail

Re: cursor Example [message #411852 is a reply to message #411846] Tue, 07 July 2009 02:52 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
@Shahzaib: as far as I can tell, no - he doesn't want to "search a record in tabular style form". He wants to "populate all the employees who belongs to dept 10 populated in tabular block of emp through cursor".

@anwer: you forgot to OPEN (and close) the cursor; thus the error. Perhaps you'd want to search for CURSOR FOR LOOPS which make such things much simpler.
Re: cursor Example [message #411897 is a reply to message #411852] Tue, 07 July 2009 04:55 Go to previous message
annu-agi
Messages: 238
Registered: July 2005
Location: Karachi
Senior Member

thank you all .. problem solve
Previous Topic: List Item Population
Next Topic: navigation problem during go item
Goto Forum:
  


Current Time: Tue Dec 03 14:26:43 CST 2024