Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 2 of 2 total |
Find command unexpected operation |
Sun, Sep 2 2012 1:28 AM | Permanent Link |
Jeff Newlin Lightspeed | I'm enjoying working with the datasets and EWB but I'm stuck on something silly. I'm trying to get a "nearest match" on a search of the CustomerID field in the sample Dataset Customer. This is my code snip -
With Customer do begin Columns['CustomerID'].SortDirection := sdAscending ; SortCaseInsensitive := TRUE ; Sort ; InitFind ; Columns['CustomerID'].AsString := 'D' ; if Find(TRUE,TRUE) then begin Memo.Lines.Add('Found ' + Columns['CompanyName'].AsString ) ; end else Memo.Lines.Add('Not Found') ; end ; My problem is that it FIND only returns true on an exact match - as if the first passed parameter was FALSE instead of TRUE. It doesn't seem to operate any differently if it's false or true on that first parameter. To be specific if I'm searching using 'D' - shouldn't it consider 'DM' the nearest match? I must be missing something here. Thank you! Jeff |
Mon, Sep 3 2012 1:50 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jeff,
<< My problem is that it FIND only returns true on an exact match - as if the first passed parameter was FALSE instead of TRUE. It doesn't seem to operate any differently if it's false or true on that first parameter. To be specific if I'm searching using 'D' - shouldn't it consider 'DM' the nearest match? >> Nearest-match searches don't return True unless the search resulting in an actual match. IOW, performing a nearest-match search doesn't change the result of the search, only how the row pointer moves in the dataset after the search. If you have any other questions, please let me know. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, November 1, 2024 at 07:01 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |