Re: Oracle Forms Search String

From: Jason Archambeau <jarchambeau_at_msn.com>
Date: 2000/05/15
Message-ID: <e5jUKjpv$GA.307_at_cpmsnbbsa04>#1/1


Set the blocks DEFAULT_WHERE property to include a variable (a GLOBAL or null canvas item maybe) as such.

:GLOBAL.junk := 'SOME PATTERN'
SET_BLOCK_PROPERTY('STUFF_BLOCK',DEFAULT_WHERE,'NAME LIKE ''%'||:GLOBAL.junk||'%''');

STUFF_BLOCK is your block name
NAME LIKE .... is the field you want to test the query against (or you could use a database column)
GLOBAL.junk is just a variable that you can set throughout the form so that the SET_BLOCK_PROPERTY doesn't have to be hard coded.

Good Luck,

Jason
"Ira Rosen" <IROSEN1_at_email.mot.com> wrote in message news:3919A667.5A500A6C_at_email.mot.com...
> I am trying to implement a search function within an Oracle Forms
> application. The search string I would like to use contains some 'LIKE'
> clauses for columns in an Oracle-based table. I want my search string to
> contain single-quote characters. I realize this sounds trivial, but I am
> unable to define a string such as: WHERE VALUE LIKE '%PATTERN%' because
> Forms (or perhaps the server) assumes that the single-quote characters
> in my search string are string delimiters. I've tried C/Unix tricks such
> as preceding the single-quote character with '\' characters, but have
> not had any luck. I want to implement this in a 'WHEN-BUTTON-PRESSED'
> trigger using the Set_Block_Property() built-in function.
>
> Thank you for your help.
>
> -Ira Rosen
>
Received on Mon May 15 2000 - 00:00:00 CEST

Original text of this message