Locating a string containing a single quote '

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
NoComprende
Posts: 135
Joined: Tue 09 Jan 2007 13:44

Locating a string containing a single quote '

Post by NoComprende » Tue 29 Apr 2008 07:58

I'm not really affected by this problem but thought you might like to know

Suppose SearchStr=="DON'T" then the following works OK

Query->Locate(SearchFld,SearchStr,TLocateOptions()LocateEx(SearchFld,SearchStr,TLocateExOptions()<<lxNearest);

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 29 Apr 2008 09:43

Thank you for the information, we will investigate this issue.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 05 May 2008 07:57

This behaviour is not connected with a single quote contained in a string.
When the IxNearest option is set, LocateEx moves the cursor to a specific record in a dataset or to the first record in the dataset that is greater than the values specified in the KeyValues parameter. At that the dataset must be sorted by KeyFields. The sorting can be set with the IndexFieldNames property.

Post Reply