Re: buttons affecting default queries..?

From: Andrew Hurst <andrew-news_at_hurstdog.org>
Date: Fri, 25 Oct 2002 13:40:07 -0700
Message-ID: <apca78$een$1_at_woodrow.ucdavis.edu>


[Quoted] Karsten Farrell wrote:

> 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.
> 

[Quoted] I should have clarified, these are two different forms. There is ALL_PROPOSALS which lists all of the proposals, then there is PROPOSALS which gets called when you double-click on the year in the ALL_PROPOSALS form.

With that said, I went back and checked again. The problem didn't surface after addition of the push button. It surfaced after the addition of a radio group. Sorry for the wrong description of the problem... (yay for versioning, cvs, and checking in after every new feature, though :). I'm still trying to figure out why it would not return any data, though.

Here is the really odd part I just remembered (and verified again): When I set up the network sniffer, and try to double click on the year to get into the report, it gets some of the data, then it returns ORA-01403: no data found. This is what I see in the traffic:

... stuff I can't tell what it is...
the (correct) query to get the data goes to the server, with :1 for the proposal_id. Shortly (as in 20 chars or so later) the correct proposal_id goes by as well.
The server responds with a list of columns from the table, about 20 or so characters apart (each column name).
The server starts returning the correct data from the proposals table, everything I've asked for.
About 1/3 of the way through the data, it ends with 'ORA-01403: no data found'.

So it appears that maybe its getting too much data back. Or maybe there is a timeout set too low? This has never been a problem before, and I can't see why a varchar2(20) column would really push us over the limit...

Thanks for the help, and sorry for the initial confusion.

-Andrew Received on Fri Oct 25 2002 - 22:40:07 CEST

Original text of this message