Home » Developer & Programmer » Forms » FRM 40505 : unable to perform Query / ORA-22806 not an object or REF (oracle Forms 9i)
FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398268] Wed, 15 April 2009 17:14 Go to next message
s.vishalkumar@gmail.com
Messages: 22
Registered: July 2007
Junior Member
Hello Everyone!!

I have block in which I choose 'From Clause Query' in the property pallete and pasted this query.

--------------------
select unique product_type PRODUCT_TYPE
from product
where supplier_id = :b00.SUPP_VAL
and product_gl_class_cd = :b00.gl_class
and product_brand = :b00.prod_brand
and product_legal_name = :B00.pln
order by 1
--------------------------
It works fine when I hardcode the values to it, but when I dynamically want to do, it throws me the following errors:

FRM 40505: ORACLE Error: Unable to perform Query
and when I press SHIFT + CTRL+E for errors it displays the following:

ORA-22806: not an object or REF
and the code which it shows is above.

Anyone who is aware of such kind of issues please help me out urgently.

Thanks,
Vishal

Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398531 is a reply to message #398268] Thu, 16 April 2009 10:16 Go to previous messageGo to next message
s.vishalkumar@gmail.com
Messages: 22
Registered: July 2007
Junior Member
Is there anyone who could kindly help me out Please!!
Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398598 is a reply to message #398531] Thu, 16 April 2009 20:59 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What happens if you do not use the 'unique'?

Please post the table structure.

David
Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398607 is a reply to message #398598] Thu, 16 April 2009 22:22 Go to previous messageGo to next message
s.vishalkumar@gmail.com
Messages: 22
Registered: July 2007
Junior Member
Hi Martin!!

The form is something like this:(in a hierarchical manner)

I have a Supplier ID : beside it I have a choose button, which when chosen gives a LOV.I can choose some value
Next I have GL class Code : which is based on the previously chosen supplier ID. It again has a LOV.
Next I have a product_brand : which is again based on the previously chosen 2 values....and so on.

So the product type is based on the 4 values given in the Query.

I have already created an LOV for product type, but the actual requirement was to be able to choose multiple values from the LOV instead of just one value.
For this reason I have taken an approach of creating check boxes on a new window/canvas.

So, in that I have chosen 'FROM CLAUSE QUERY' from property pallete. and pasted the LOV code which worked previously inside Query Source(All of the code in property pallete).

This is the code I have:
select unique product_type
from product
where (:b00.supp_val = 'ALL' or supplier_id = :b00.supp_val)
and (:b00.gl_class = 'ALL' or product_gl_class_cd = :b00.gl_class)
and (:b00.prod_brand = 'ALL' or product_brand = :b00.prod_brand)
and (:B00.Pln = 'ALL' Or Product_Legal_Name = :B00.Pln)
ORDER BY 1

So, when I paste this code and run I am getting the error
FRM 40505.
When I hardcode the values, I get the correct results, but when I want to pass dynamically I am not able to.

Please could you let me know where I am going wrong.

Any knid of help would be greatly appreciated!!
Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398610 is a reply to message #398607] Thu, 16 April 2009 22:33 Go to previous messageGo to next message
s.vishalkumar@gmail.com
Messages: 22
Registered: July 2007
Junior Member
Martin,

I have removed unique from the statement, but still gives the same error:

FRM 40505: Unable to unable to perform Query
ORA-22806 not an object or REF.

I have attached the screenshot.

Thanks,
Vishal
  • Attachment: screen1.GIF
    (Size: 26.04KB, Downloaded 1220 times)
Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398612 is a reply to message #398610] Thu, 16 April 2009 22:51 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
From where are you getting this 'Martin' bullshit???

Don't piss me off if you want answers!!!

David
Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398614 is a reply to message #398612] Thu, 16 April 2009 23:04 Go to previous messageGo to next message
s.vishalkumar@gmail.com
Messages: 22
Registered: July 2007
Junior Member
I am really very sorry David!!

could you please help me David.
Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398618 is a reply to message #398614] Thu, 16 April 2009 23:25 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Vishal,

Please post the table structure.

David
Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398623 is a reply to message #398618] Thu, 16 April 2009 23:36 Go to previous messageGo to next message
s.vishalkumar@gmail.com
Messages: 22
Registered: July 2007
Junior Member
PRODUCT_ID          NOT NULL VARCHAR2(7)
PRODUCT_NAME                 VARCHAR2(25)
PRODUCT_LEGAL_NAME           VARCHAR2(30)
PRODUCT_STATUS      NOT NULL VARCHAR2(1)
SUPPLIER_ID         NOT NULL VARCHAR2(7)
LEGAL_REGISTRANT_ID NOT NULL VARCHAR2(7)
PRODUCT_GL_CLASS_CD NOT NULL VARCHAR2(4)
PRODUCT_TYPE                 VARCHAR2(20)
PRODUCT_BRAND                VARCHAR2(20)

PK is PRODUCT_ID
[EDITED by DJM: add code tags]

[Updated on: Fri, 17 April 2009 01:08] by Moderator

Report message to a moderator

Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398640 is a reply to message #398623] Fri, 17 April 2009 01:10 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You have "Product_Legal_Name = :B00.Pln". Do you need to concatenate quotes around the item names so that it looks like "Product_Legal_Name = ''||:B00.Pln||'''"?

David
Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #398791 is a reply to message #398640] Fri, 17 April 2009 10:06 Go to previous messageGo to next message
s.vishalkumar@gmail.com
Messages: 22
Registered: July 2007
Junior Member
No, I dont think so.
Do you want me to try and see.
Re: Help reqd. Re: FRM 40505 : unable to perform Query / ORA-22806 not an object or REF [message #399412 is a reply to message #398791] Wed, 22 April 2009 02:37 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Yes please.

David
Previous Topic: Timer have problem
Next Topic: question
Goto Forum:
  


Current Time: Fri Apr 19 21:37:10 CDT 2024