Home » Developer & Programmer » Forms » FRM 40505 - unable o perform query (FROM QUERY CLAUSE)
FRM 40505 - unable o perform query (FROM QUERY CLAUSE) [message #86624] Thu, 14 October 2004 10:56 Go to next message
nidhi
Messages: 22
Registered: March 2002
Junior Member
HI experts,

I am using FROM QUERY CLAUSE in to populate my datablock, I am using developer 9i

It is giving error FRM 40505 - unable o perform query, when I run form,what could be the error

Thanks

Nidhi
I forgot to tell the SQL runs fine with toad [message #86625 is a reply to message #86624] Thu, 14 October 2004 10:59 Go to previous messageGo to next message
nidhi
Messages: 22
Registered: March 2002
Junior Member
hi,

I forgot to tell you that the SQL work perfectly, I tested it in TOAD and returns perfect results

Thanks
nidhi
Re: FRM 40505 - unable o perform query (FROM QUERY CLAUSE) [message #86646 is a reply to message #86624] Fri, 15 October 2004 19:39 Go to previous messageGo to next message
rupa
Messages: 41
Registered: August 2002
Member
you can check the error by pressing shift+F1, this will show you the query that is built by the form at runtime. try to run that same query and see in the toad what is the problem. maybe some syntax problem is there. please check and let me know the exact. give the entire query.
Re: FRM 40505 - unable o perform query (FROM QUERY CLAUSE) [message #86682 is a reply to message #86646] Tue, 19 October 2004 01:44 Go to previous messageGo to next message
ashish
Messages: 107
Registered: December 2000
Senior Member
seT ithem property database item to no if u have any item which is not releated to database

ASHish
Re: FRM 40505 - unable o perform query (FROM QUERY CLAUSE) [message #87544 is a reply to message #86682] Thu, 13 January 2005 17:24 Go to previous messageGo to next message
Divyaman
Messages: 1
Registered: January 2005
Junior Member
Thanks for posting this message. I had the same problem and managed to fix it by setting the 'database item' property of one of the data items to 'no'. That item wasn't really related to the datablock.
Re: FRM 40505 - unable o perform query (FROM QUERY CLAUSE) [message #349058 is a reply to message #87544] Thu, 18 September 2008 14:21 Go to previous messageGo to next message
former
Messages: 15
Registered: June 2008
Junior Member
Hi,

I have an added a text item to the form with datatype as 'Date' and initial value as $$datetime$$. Also I have given this code on 'When-New-Form-Instance' trigger

:books.displaydatetime :=sysdate;

The forms runs without errors and displays the current date and time. However when I click the 'Execute Query' instead of displaying records, a message is shown - 'Do you want to save the changes you made' and then the form would go into an 'FRM -40505' error.

To correct this , I went through this thread and changed the 'Database Item' Property to 'No'. Now, I am able to execute the query. But, another problem occurs. When I click on execute, the date and time disappears. The text field looks empty when ever I go to execute query mode.

Need help on this.

Thanks
Deepti
Re: FRM 40505 - unable o perform query (FROM QUERY CLAUSE) [message #349060 is a reply to message #349058] Thu, 18 September 2008 14:56 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What would you like this form to do? Everything you've said is correct, and that is expected Forms behaviour.

  • If you change database items and try to execute a query, you'll get the "Do you want to save changes" message.
  • If you execute a query, non-database items will be empty (as nothing filled them).


So, what do you, actually, expect?
Re: FRM 40505 - unable o perform query (FROM QUERY CLAUSE) [message #349075 is a reply to message #349060] Thu, 18 September 2008 15:59 Go to previous messageGo to next message
former
Messages: 15
Registered: June 2008
Junior Member
Yes, I agree with what you are saying. What I need is - When I run the form, the datetime text box should be displayed and remain throughout the session.

This text box shouldn't be affected whether the form is in a query mode / execute mode.

Re: FRM 40505 - unable o perform query (FROM QUERY CLAUSE) [message #349127 is a reply to message #349075] Fri, 19 September 2008 00:18 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, you could create a new control block and put this "date" item in there. It wouldn't be affected by executing a query in another, data block.
Re: FRM 40505 - unable o perform query (FROM QUERY CLAUSE) [message #349165 is a reply to message #86624] Fri, 19 September 2008 03:03 Go to previous message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Your problem is clear:

  1. The message 'Do you want to save the changes you made' will normally be displayed because the status of the datablock is now changed when you assign SYSDATE to your field. So when you try to execute query, FORMS will ask you if you want to commit your changes.
  2. If the field is not a database item, it's normal that it does not appear because no source is specified for it.

Solution:

  1. To avoid dispalying this message, change the status of the datablock to 'QUERY' by using SET_BLOCK_PROPERTY, and then the date assigned will be commited on the first 'save' performed.
  2. Keep your field 'a database item', and on executing query, it will show the corresponding data.

Hope this will help you.

Rajy
Previous Topic: how to make users through interfaces in developer6i
Next Topic: order by in query mode
Goto Forum:
  


Current Time: Sat Dec 10 09:14:24 CST 2016

Total time taken to generate the page: 0.05480 seconds