Home » Developer & Programmer » Forms » frm-12001 Cannot Create Record group
frm-12001 Cannot Create Record group [message #158743] Tue, 14 February 2006 03:17 Go to next message
Atul P
Messages: 61
Registered: June 2003
Location: Mumbai-Jakarta
Member

HI

I am using forms 6i.
I have a form where I use one LOV and multiple
Record Groups for the same.

Till today I had 6 Record groups.
However now when i wish to add one more Record Group it does not allow.
It says
frm-12001 (Cannot Create the Record Group (Check your Query)

Also if I wish to change the Query for existing record Groups then also the same error comes.
The queries are 100% correct and simple.

however if i change the Query to
"select 1 from dual" it works fine.
Trust me my queries are correct still cannot create or change the Record Groups.

Thks in Advance
Atul P

Re: frm-12001 Cannot Create Record group [message #158756 is a reply to message #158743] Tue, 14 February 2006 04:22 Go to previous messageGo to next message
vban2000
Messages: 207
Registered: March 2005
Senior Member
Hi Atul

No idea at all.. if it work in your privous one, then it should work for any additional one.

Can we see that piece of the code? so to help us into investigating such problem.

Regards
AnDy
Re: frm-12001 Cannot Create Record group [message #158760 is a reply to message #158756] Tue, 14 February 2006 04:47 Go to previous messageGo to next message
Atul P
Messages: 61
Registered: June 2003
Location: Mumbai-Jakarta
Member

Hi Andy


This is the record Group Query :
-------------------------------------
SELECT GL_SHORT_DESC , GL_CODE
FROM FM_GL_MASTER
WHERE GL_TYPE IN ('CB')
AND NVL(GL_STATUS,'Y') = 'Y'
AND NVL(GL_COMP_CODE,:GLOBAL.COMPANY_CODE) = :GLOBAL.COMPANY_CODE
ORDER BY 2
--------------------------------------
And this exactly Query with "NOT IN" instead of "IN" in
WHERE condition is working u know.

Regards
Atul P
Re: frm-12001 Cannot Create Record group [message #158762 is a reply to message #158743] Tue, 14 February 2006 04:56 Go to previous messageGo to next message
vban2000
Messages: 207
Registered: March 2005
Senior Member
Hi Atul P

Suspecting you should use double single quote ('') instread of one single quote (')

As an example (which I hope it helps..)

-- This is my SQL query
SELECT   ref_desc, ref_code
    FROM REFERENCES
   WHERE ref_type = 'SALE_CAT' AND ref_code = :parameter.p_category
ORDER BY 2


now, to put in the form, this becomes my query

DECLARE
   TEMP    NUMBER;
   rg_id   recordgroup;
BEGIN
   rg_id :=
      CREATE_GROUP_FROM_QUERY ('CGDV$DLRG',
                                  'SELECT REF_DESC, REF_CODE '
                               || 'FROM   REFERENCES '
                               || 'WHERE  REF_TYPE = ''SALE_CAT'' '
                               || 'AND    REF_CODE = '''
                               || :parameter.p_category
                               || ''' '
                               || 'ORDER BY  2'
                              );
   TEMP := POPULATE_GROUP (rg_id);
   POPULATE_LIST ('CTLBLK.CATEGORY', rg_id);
   DELETE_GROUP (rg_id);
END;


Hope this helps...

regards
AnDy
Re: frm-12001 Cannot Create Record group [message #158766 is a reply to message #158762] Tue, 14 February 2006 05:05 Go to previous messageGo to next message
Atul P
Messages: 61
Registered: June 2003
Location: Mumbai-Jakarta
Member

Hi Andy

Actually I am not creating and populating at runtime.
What I am doing is I am actually making Multiple Record groups in Form at design time.
and at Runtime w.r.t condition i just assign the
Record Group to the LOV.

e.g
------------------------
IF :PARAMETER.P_VOUCHER_TYPE IN ('BPV') THEN SET_LOV_PROPERTY('LOV_GL_CODE',GROUP_NAME,'RG_GL_CODE_BPV');
ELSIF
........
END IF;
------------------------
If no option then may be I will have
to make Record groups with at runtime.

Regards
Atul P

Re: frm-12001 Cannot Create Record group [message #158797 is a reply to message #158743] Tue, 14 February 2006 08:06 Go to previous messageGo to next message
vban2000
Messages: 207
Registered: March 2005
Senior Member
Sorry Atul

My knowledge is limtited (PTY LTD... Wink )

But I am sure there is a way doing it.. I am sure David (djmartin) knows.. He is very good!

regards
AnDy
Re: frm-12001 Cannot Create Record group [message #158801 is a reply to message #158797] Tue, 14 February 2006 08:13 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
A silly question perhaps, but you did connect as the correct user right? The fact that modifying an existing record group results in the same error is a little bit strange.

MHE
Re: frm-12001 Cannot Create Record group [message #158864 is a reply to message #158801] Tue, 14 February 2006 16:00 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I agree with Maarten, I think you are signing onto your Oracle database with a userid that does not have the right accesses.

What was the original code and what was the code after you made your changes?

David
Re: frm-12001 Cannot Create Record group [message #158877 is a reply to message #158864] Tue, 14 February 2006 20:53 Go to previous messageGo to next message
Atul P
Messages: 61
Registered: June 2003
Location: Mumbai-Jakarta
Member

Hi Marteen,Maaher, Andy

I am connected to the database with proper USER Name.
My Original COde for Record Group-Query at Design Time
is
SELECT	GL_SHORT_DESC , GL_CODE
FROM	FM_GL_MASTER
WHERE	GL_TYPE IN ('CB')
AND     NVL(GL_STATUS,'Y')       = 'Y'
AND NVL(GL_COMP_CODE,:GLOBAL.COMPANY_CODE) = :GLOBAL.COMPANY_CODE
ORDER BY  2


Now what I want is to make another record Group with little changes in Query.
I tried to do the same but it gave me the
Error: frm-12001 Cannot Create recordgroup.
SO I assumed soemthing was wrong in my query.
For the same I tried to modify an Existing record group
which was working fine till now.
The query for esixting record group was as above.
In the same query all I tried to change was the
Order by clause replacing 1 with 2.
However it shows me the same error.
It might sound silly to you but thats how it is.
A very very abnormal behaviour.

Rgds
Atul P
Re: frm-12001 Cannot Create Record group [message #158878 is a reply to message #158877] Tue, 14 February 2006 21:16 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please open a SQL*Plus session to your database using the userid & password you have used for your forms session, and run this query in this new session. Does it work for you?

Do you have write access to the form?

David
Re: frm-12001 Cannot Create Record group - SOLVED [message #158880 is a reply to message #158878] Tue, 14 February 2006 21:41 Go to previous messageGo to next message
Atul P
Messages: 61
Registered: June 2003
Location: Mumbai-Jakarta
Member

Hi djmartin


Yes the query works in Sql*plus session.
I do have write access to the form.

Howevere I just tried to use the query as
select 'atul',1 from dual;


This way I can make the Recordgroup.
So what I tried to do was write the same sql statement
line by line.
As in adding normal query with no where clause.
It worked
then adding where clause it worked.
then and condition and its working.

I know it might sound sily again but this is how it happened.
anyways Happy that it works.

Is there any Patch which i might need to download and
upgrade my forms version.
I have Forms [32 Bit] Version 6.0.8.8.0 (Production)
using on WIN-XP

Anyways thks for ur support.
trust me it is silly but this is really what happened and how it got solved.

Regards
Atul p


Re: frm-12001 Cannot Create Record group [message #158900 is a reply to message #158743] Wed, 15 February 2006 00:32 Go to previous messageGo to next message
vban2000
Messages: 207
Registered: March 2005
Senior Member
glad it worked.. and a found **strange** BUGs in the Form Builder!

Could it be the OC4J? Sometime ago, I was doing some Math calculation in the Form... However, the result is always wrong? (compare to my manual calculation..). After a very long struggle, I decided to close the OC4J and restart it again. and (magically) the result is correct.. (some kind of bug in OC4J??)

regards
AnDy
Re: frm-12001 Cannot Create Record group [message #184153 is a reply to message #158900] Tue, 25 July 2006 09:47 Go to previous message
Bombi
Messages: 1
Registered: July 2006
Junior Member
I had the same Problem with FRM-12001.

But my querys works, if they are written in the one line without linebreaks. I think this is the Trick! Laughing Laughing Laughing Cool
Previous Topic: Connect and Disconnect
Next Topic: Only one CheckBox should be checked at a time.
Goto Forum:
  


Current Time: Fri Sep 20 12:24:58 CDT 2024