Home » Developer & Programmer » Forms » procedure and execute_query
procedure and execute_query [message #349420] Sun, 21 September 2008 12:42 Go to next message
maher534510
Messages: 25
Registered: September 2008
Location: jordan
Junior Member
when call this procedure
***********************
PROCEDURE FIND_OFFICE IS
BEGIN
go_block('OFFICE_DATA');
set_block_property('OFFICE_DATA',default_where,'office_id='||:global.p_office_ID);
execute_query(no_commit);
END;
************************
i cannot perform execute_query on that data block why?
Re: procedure and execute_query [message #349425 is a reply to message #349420] Sun, 21 September 2008 14:07 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
i cannot perform execute_query on that data block. why?

Oh, many possible reasons!

  • your system shuts down because of a power loss
  • someone, in another session, deletes all data from a table and commits
  • no records satisfy a new DEFAULT_WHERE condition
  • global variable contains no value
  • ...
By the way, it would be quite easier to answer your question if you have described how this "I can not execute query" manifests.
Re: procedure and execute_query [message #349427 is a reply to message #349420] Sun, 21 September 2008 14:21 Go to previous messageGo to next message
maher534510
Messages: 25
Registered: September 2008
Location: jordan
Junior Member
okay man
i have table contains offices data
to go to any office_id like office 101
i make global variable contains office_id (number) 101 on the button that can pressed and go to that data .
now in the new form instance for office data form
i was put the code
***********************
PROCEDURE FIND_OFFICE IS
BEGIN
go_block('OFFICE_DATA');
set_block_property('OFFICE_DATA',default_where,'office_id='||:global.p_office_ID);
execute_query(no_commit);
END;
************************
if i delete this code execute_query done succefully
but when i call this procedure error message
can not perform query error
Re: procedure and execute_query [message #349486 is a reply to message #349427] Mon, 22 September 2008 01:23 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In that case, go to Help menu and select "Display error"; it will show you why the query can not be run. If you still don't know what to do with this information, post it back here (along with possible ORA-xxxxx error code).
Re: procedure and execute_query [message #349493 is a reply to message #349427] Mon, 22 September 2008 01:37 Go to previous message
manu_jariwala
Messages: 20
Registered: August 2005
Location: Surat
Junior Member

set_block_property('OFFICE_DATA',default_where,'office_id='||:global.p_office_ID);

Hi,

Type this line as:

set_block_property('OFFICE_DATA',default_where,'office_id=:global.p_office_ID');

This could be run.

Regards,
Manish H. Jariwala
Previous Topic: Oracle Menu
Next Topic: what is the difference between forms 4.5 and 6i?
Goto Forum:
  


Current Time: Sat Dec 03 11:54:56 CST 2016

Total time taken to generate the page: 0.23136 seconds