Home » Developer & Programmer » Forms » Problem with ENTER_QUERY, EXECUTE_QUERY
Problem with ENTER_QUERY, EXECUTE_QUERY [message #141337] Sun, 09 October 2005 06:36 Go to next message
adamjsawyer
Messages: 79
Registered: April 2005
Location: Perth, Western Australia ...
Member
Hi I'm having a problem with my form. I have a button which needs to perform an ENTER_QUERY, get a value from an LOV, and then do an EXECUTE_QUERY. The problem is that the ENTER_QUERY doesn't appear to do anything, so when the EXECUTE_QUERY runs, it just pulls all the records out instead of just the one I want.
Another thing I want to do is be able to do a Cancel Query using PL/SQL, but I can't find the command for it anwhere.

any help appreciated
adam
Re: Problem with ENTER_QUERY, EXECUTE_QUERY [message #141401 is a reply to message #141337] Mon, 10 October 2005 01:08 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Is the LOV available to you in Enter_Query mode? Do you return the value from the LOV to your database item? Unless you are running 10g I don't think that you can program the form to cancel a running query. 9i was supposed to work but I was never very successful with getting it to stop. Check the block or form properties (I can't remember which) for the 'cancel' facility. It will be in the form help.

David
Re: Problem with ENTER_QUERY, EXECUTE_QUERY [message #141436 is a reply to message #141401] Mon, 10 October 2005 05:02 Go to previous messageGo to next message
adamjsawyer
Messages: 79
Registered: April 2005
Location: Perth, Western Australia ...
Member
If I press the ENTER_QUERY button on the smart bar, and then click the LOV it works fine. It just doesn't work when the code is all in one button, really weird. I got cancel query working thanks to someone on another forum, u just say

-- Cancel Query
IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
EXIT_FORM;
END IF;

thx
adam
Re: Problem with ENTER_QUERY, EXECUTE_QUERY [message #141448 is a reply to message #141337] Mon, 10 October 2005 06:07 Go to previous messageGo to next message
kiran
Messages: 503
Registered: July 2000
Senior Member
Quote:

It just doesn't work when the code is all in one button


Can you post that code.

--Kiran.
Re: Problem with ENTER_QUERY, EXECUTE_QUERY [message #141464 is a reply to message #141448] Mon, 10 October 2005 07:32 Go to previous message
adamjsawyer
Messages: 79
Registered: April 2005
Location: Perth, Western Australia ...
Member
ENTER_QUERY(no_validate);
--message('sysmode: ' || :SYSTEM.MODE);

IF :SYSTEM.MODE = 'ENTER-QUERY' THEN

-- Get the JOB_ID from the list of values
GO_ITEM('WTL_JOBS.JOB_ID');
LIST_VALUES;

IF :WTL_JOBS.JOB_ID IS NULL THEN
EXIT_FORM; -- Cancel the query
ELSE
-- Fill out the form values
EXECUTE_QUERY;

-- Go back to the LOV button
GO_ITEM('WTL_JOBS.JOB_ID_LOV_BUTTON');
END IF;
ELSE
message('No enter query');
END IF;
Previous Topic: Running a form without connecting to database
Next Topic: :Forms6i documentation
Goto Forum:
  


Current Time: Fri Sep 20 01:32:24 CDT 2024