Home » Developer & Programmer » Forms » creating record group with query problem
creating record group with query problem [message #262669] Tue, 28 August 2007 01:05 Go to next message
fam_bila
Messages: 43
Registered: August 2007
Location: pakistan
Member
i want to make a run time record group and associate it to the the LOV which then populated to a text item(session).

But i add a where class in SQL statement which select data according to the value of another text item(class).

i write the following code on post_change trigger of text item(class).

DECLARE     
	group_id		RecordGroup;     
	query_ok		NUMBER;  
	BEGIN  
	/* create the group rc_se and assign its id to the  
	** variable group_id  */     
	group_id := Create_Group_From_Query ('rc_se', 
	'SELECT s.session_no,      
	FROM sesion s, class_code c       
	WHERE c.class = data.class AND c.session_id = s.session_id');  
	/* now execute the new group's query, using the variable  
	** group_id to identify the group */     
	query_ok := Populate_Group(group_id);    
	/* if the query failed, abort this trigger by raising a  
	** predefined exception */     
	IF query_ok <> 0 THEN       
		RAISE Form_Trigger_Failure;     
	END IF;
		POPULATE_LIST('data.SESSION',group_id);
  END;



At copmliation process there is no error. but when a run form and go the text item(session) a got errors

that are


FRM-41072 cannot create group rc_sc

FRM-41076 error populating group
.


now will any body solve this problem,
i need it urgently


Re: creating record group with query problem [message #262672 is a reply to message #262669] Tue, 28 August 2007 01:09 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
You have used following query in your code
'SELECT s.session_no,
FROM sesion s, class_code c
WHERE c.class = data.class AND c.session_id = s.session_id');
/* now execute the new group's query, using the variable
** group_id to identify the group */

plz remove the comma after column "'SELECT s.session_no,"

Regards,
Azam Khan
Re: creating record group with query problem [message #262706 is a reply to message #262672] Tue, 28 August 2007 02:01 Go to previous message
fam_bila
Messages: 43
Registered: August 2007
Location: pakistan
Member
AFTER sending my problem
i got this error which u tell.
so i remove it .
thanx


but errors are not remove

Also on text item(session) i write code on key-next-item trigger

list_values(restrict);



but errors are not remove .

now wht's the problem.
Previous Topic: Problem in multi record block..........!
Next Topic: dde with Access
Goto Forum:
  


Current Time: Tue Dec 06 16:14:01 CST 2016

Total time taken to generate the page: 0.20474 seconds