Re: Developer 2000 - query problem - 2nd try

From: Steve Cosner <stevec_at_zimmer.CSUFresno.EDU>
Date: 1996/07/12
Message-ID: <4s5sb2$iv_at_zimmer.CSUFresno.EDU>#1/1


In article <4s43ae$ce5_at_duke.telepac.pt>, Cast, Jose Raposo <cast_at_mail.telepac.pt> wrote:
>Hi
>I've come across a weird situation.
>I've got Dev 2K 1.3 (Win95) and O7.3 for NT and I'm creating a form
>where I want to make a query.
>In this form I've put a pre-query trigger with a % in the field to
>query, compile it and then run it. Or tried to run it, because it
>never appear and crashs. Win95 say that the runforms is not
>responding.
>Now, if I comment the pre-query trigger, everything Ok. If I copy 'A%'
>to the field, everything Ok. Anyway, I've got a few more of these
>forms working perfectly. In SQLPlus3.2, the same query works fine (as
>it should).
>I've just upgraded to O7.3, so I'm wandering if I've come across a
>feature (a new one). The table in question was created from scratch in
>the new version, while the others were upgraded in the instalation.

If I understand correctly what you are doing, you are trying to put the pattern-matching character '%' into an item to be used in the query.

If this is the case, it makes sense to me that the form cannot handle it: A pattern-matching character by itself is meaningless--it means select every value for that column. The form's programming for building a where clause must be going into a loop because of the %.

On the other hand, putting A% in the item is meaningful-- you want everything from that column what begins with the letter A.

So what IS the reason for putting a single '%' character into the item? What are you trying to achieve?

If you are trying to limit the query, you might want to try setting the default_where clause from your pre-query trigger:   Set_Block_Property('BLK1',DEFAULT_WHERE,'COL3 LIKE A%');

Hope this helps,
Steve Cosner Received on Fri Jul 12 1996 - 00:00:00 CEST

Original text of this message