Quantcast
Channel: SCN: Message List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 7329

Re: Case Insensitive Searches: How is the datawindow.table.select string put together?

$
0
0

The problem is that PowerBuilder supplies everything before the word 'like'. Here is the sequence of events:

  1. User types farm into the edit control for the column named name.
  2. User clicks out of that control and the itemchanged() function is called. This is code written by my predecessor and that I am maintaining. itemchanged() grabs farm and changes it to
    like %[Ff][Aa][Rr][Mm]%
    and puts all of that back into the edit control with a call to settext() and then calls accepttext() to get it into the Primary Buffer. (farm will be put back into the edit control and the user never notices the change. It is seen only in the debugger when stepping through the code.)
  3. accepttext() causes PowerBuilder to automatically generate the DataWindow.table.select string which will now look like:
    SELECT ...  WHERE (((~"DBO~".~"CLIENTS~".~"NAME~" like '%[Ff][Aa][Rr][Mm]%')))  

 

I don't have access to the column name to wrap it inside a call to upper() or lower(). I am supplying only half of the where clause (the half after the column name). And the [ ]'s that worked with our Sybase database do NOT work for the Oracle database and I have to change "my half" of the where clause to get case insensitive searches.

If I knew where PowerBuilder is parsing the SELECT statement maybe I could call lower() or upper().


Viewing all articles
Browse latest Browse all 7329

Latest Images

Trending Articles



Latest Images