Re: Forms5.0: How to prevent NO-Search-Criteria Query?

From: Mark Gumbs <mgumbs_at_nospam.hotmail.com>
Date: Thu, 10 Jun 1999 09:50:00 +0100
Message-ID: <375f79e5.0_at_145.227.194.253>


I suppose you can check the block status (new, changed etc) in your pre-query before querying the database.

Mark

Sean Zhang wrote in message <5Ny73.4258$AO1.14233726_at_firenze.visi.net>...
>Hello, Everyone,
>
>Our Developer 2000 version 2.0 is running on Windows 95
>in a Client/Server configuration.
>
>Question: If a user hits F7(enter-query) , then F8 (execute-query) without
>putting any search conditions on the form fields, the Query starts
scanning
>the whole underlying tables, which may go forever for bigger tables. One
way
>I thought can prevent this happening is to use a Pre-Query trigger
>detecting
>if all fields are NULL, which will look like this:
> if :Blk.field1 is null AND :blk.field2 is null
>AND...........:blk.field100 is null then
> message(' Query has no search condition, not allowed');
> raise form_trigger_failure;
> end if;
>
>Is there a better way to prevent something like this happening? I certainly
>think it's not
>a good idea to list all field names in the code in order to detect if there
>is a search condition.
>Any suggestions are greatly appreciated.
>
>
>Sean Zhang
>sean_at_cnfei.com
>
>
>
>
Received on Thu Jun 10 1999 - 10:50:00 CEST

Original text of this message