Results 1 to 9 of 9

Thread: IS THIS A BUG IN SQLStrLike?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Mar 2009
    Location
    Adelaide, South Australia
    Posts
    477

    Default Re: IS THIS A BUG IN SQLStrLike?

    Quote Originally Posted by Martin Moleman View Post
    Will take another look at the SQLStrLike function to see if we can improve for MySQL use.
    Thanks Martin,
    I had come to the conclusion that it had to be a syntax difference between MySQL and MsSQL. When I tested your code on my MySQL Workbench 1 and 2 needed the Search String enclosed in % signs.
    Code:
    Select * from Customer Where City like 'M%'; //Does not work
    Code:
    Select * from Customer Where City like '%M%'; //Does work
    While you're looking at it, is there any reason why you need to pass iField to it rather than the Field name? The string it returns uses the field name so the user has to use Field_Map to call the Function which must then do the reverse.

    Also, Dennis might like to look at the Help. Under SQLStrLike in the Development Guide the example shows iFile being passed, which is wrong:
    Code:
    Set pbUseDDSQLFilters to True
     
    Procedure OnConstrain
        String sFilter
        Integer iFile
        Get Main_File to iFile
        Get SQLStrLike iFile “J” to sFilter
        Set psSQLFilter to sFilter
    End_Procedure
    The definition of SQKStrLike in the Help for Datadictionary methods shows:
    Code:
     Function SQLStrLike Integer iField String sSearch Returns String
    Which is correct.

    Ian
    Last edited by Ianv; 25-Jul-2019 at 08:46 PM.
    The most important leg on a three legged stool is the one that's missing.
    Murphy's Law (2)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •