Re: Help! Forms45 Pre-query trigger problem

From: <stevec_at_zimmer.csufresno.edu>
Date: Fri, 24 Apr 1998 10:21:40 -0600
Message-ID: <6hqam4$7ul$1_at_nnrp1.dejanews.com>


In article <6hmuae$48g$1_at_maple.cgin.us-md.citicorp.com>,   "Koichi Nakano" <koichi.nakano_at_citicorp.com> wrote:
>
> Could someone help me to solve this problem?
>
> The problem is coming when we enter some value staring with
> some space before query in the form. Oracle Form creates in
> incorrect select statement as follows;
>
> In forms 4.5
> =========================================================
> In pre query the field has value '1301'
> Oracle Forms creates the query condition as
>
> where (RECV_EXT_INSTM_SRC_ID=:3)
> and (RECV_EXT_INSTM_ID LIKE:4) /* correct */
> and (OFFIC_CDE=:5)
> order by recv_instm_cde,fund_cde
> =========================================================
> In pre query field has value ' 1301' /* starting with space */
> Oracle Forms creates the query condition as
>
> where (RECV_EXT_INSTM_SRC_ID=:3)
> and (RECV_EXT_INSTM_ID :4) /* Incorrect ( 'LIKE' is missing) */
> and (OFFIC_CDE=:5)
> order by recv_instm_cde,fund_cde
> =========================================================
>
> We are using Developer/2000 R1.3.2 for Alpha OpenVMS and
> Forms is V4.5.7.2.1.
>
> Is there any way to solve this problem?
> I'm wondering this is Forms45 bug...

I suspect there is something wrong with your syntax. I assume you are using the default Enter Query mode, and entering a value like "--1301%" (without the quotes, and spaces where the dashes are, AND including the percent symbol, which you didn't in your text above). I tried it, and it works fine (but I'm using Forms on Windows95).

You might also try, in Enter Query mode, entering:

   #LIKE ' 1301%'
in the column (all quotes, #, and % included). This will guarantee that the "like" phrase will be included.

The underlying problem here is that any data stored in a database with leading spaces is ALWAYS going to be hard to retrieve, since you never know how many spaces there are, and you need an exact match to find the rows. (Why do you do that anyway?)

Good luck,
Steve Cosner



http://members.aol.com/stevec5088
Downloadable Quick Access utility form: Display and update any table.

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri Apr 24 1998 - 18:21:40 CEST

Original text of this message