Re: buttons affecting default queries..?

From: Karsten Farrell <kfarrell_at_medimpact.com>
Date: Fri, 25 Oct 2002 19:58:35 GMT
Message-ID: <Lnhu9.426$VR1.19369250_at_newssvr13.news.prodigy.com>


Andrew Hurst wrote:
> I have a button that when I added it, stopped its forms' query from
> working, and I don't know why. Thanks in advance for all help you can
> give me. Here is my situation:
>
> I have a form, that lists proposals. By clicking on the year of the
> proposal it takes you to a detail form for that proposal. Essentially a
> "select <columnlist> from proposals where proposal_id =
> <clicked_proposal_id>" is executed to populate the detail form. This
> has been working fine, i.e. it brings up the correct proposal in the
> detail form, and all is happy. I recently added a button to the
> proposals detail form, to print it out with a Report. For this I added
> 2 alerts, 1 program unit, and the button with a WHEN-BUTTON-PRESSED
> trigger. The trigger just calls the program unit.
>
> But here lies the problem: Now when I run the ALL_PROPOSALS form, and
> it lists all of the proposals, when I click on a year for a specific
> proposal I get a "FROM-40350: Query caused no results to be retrieved"
> error. I've been trying to figure out why, but I don't see anything
> that I have changed that might cause this. I haven't modified the
> DEFAULT_WHERE, and I didn't add any columns to the block for this query.
>
> The correct query appears to be executing, as I've go so far as to sniff
> the network for the connection, and look whats running. I can see the
> correct query float by, then I can run it by hand in TOAD with no problems.
>
> Does anyone have any idea what could cause this? Why would adding a
> button, a trigger, and a program unit cause the query to fail? Is there
> some setting that might have been flipped that I'm not aware of?
>
> Thanks for the help, and let me know if you need more information.
>
> -Andrew Hurst
>
I assume you put the WHEN-BUTTON-PRESSED trigger at the correct level (button level)? If it's at the wrong level (where your year-click is), you will run the wrong query (or at least not the one you expect). This is just "grasping at straws" since adding what you did to the Form shouldn't break it. Received on Fri Oct 25 2002 - 21:58:35 CEST

Original text of this message