Cannot find in TEXT field

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rahucha
Posts: 24
Joined: Tue 18 Nov 2014 09:52

Cannot find in TEXT field

Post by rahucha » Thu 11 Dec 2014 11:04

Hi,

I have a TEXT field in my table but when I try to search within that field, it does not report any row. Example:

Code: Select all

SELECT * FROM Customers
WHERE Customer_Notes LIKE '%peter%'
The "Customer_Notes" contains UNICODE chars. I have tried many modifications (using "collate utf8_general_ci, etc.) but nothing, always 0 rows.

Any help?

Thanks!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Cannot find in TEXT field

Post by ViktorV » Thu 11 Dec 2014 12:36

This behavior may depend on the MySQL server, not MyDAC. Please execute the following SQL query in third-party SQL query editor and let us know the results.

rahucha
Posts: 24
Joined: Tue 18 Nov 2014 09:52

Re: Cannot find in TEXT field

Post by rahucha » Fri 12 Dec 2014 10:57

Thanks Viktor,

I have tried on a server database and it works fine.

It's when I tried on an embedded database where it cannot find the string inside the TEXT field.

Is that a problem with "libmysqld.dll"? (I'm using the DLL version 5.6.21.0)

Let me know please.

Thanks.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Cannot find in TEXT field

Post by ViktorV » Wed 17 Dec 2014 08:47

Please let us know the results of this SQL query execution in a third-party SQL query editor.

rahucha
Posts: 24
Joined: Tue 18 Nov 2014 09:52

Re: Cannot find in TEXT field

Post by rahucha » Wed 17 Dec 2014 10:29

Hi Victor,

Not sure if I explained myself.

I run the application with an embedded database and the string is not found on a TEXT field.

I run the *same* application but changing the database (from embedded to a server database) and now the string is found in the TEXT field.

Everything is the same (the application, the query, etc.) the only difference is that I just point to an embedded database or a server database in runtime.

Thanks

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Cannot find in TEXT field

Post by ViktorV » Wed 17 Dec 2014 11:00

As we wrote above, this behavior depends on the MySQL server, not MyDAC. To ensure this, execute the following SQL query in a third-party SQL query editor and check the results.

Post Reply