IndexFieldNames problem

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pedja2
Posts: 29
Joined: Thu 04 Jun 2009 11:11

IndexFieldNames problem

Post by pedja2 » Tue 16 Jun 2009 11:25

Hi,

when I use MyQuery.Lookup(FieldName,SearchValue,ResultField)) on TMyquery where no IndexFieldNames is defined everything works ok but very slow, but when I add value in IndexFieldNames property and variable "SearchValue" is empty Myquery return error : '' is not valid integer value.

I noticed also that if IndexFieldNames is defined you can not use this dataset for lookup fields if field type is different. With empty IndexFieldNames everything is working ok.

Regards,
Pedja

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

Post by Dimon » Tue 16 Jun 2009 12:26

Please try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

pedja2
Posts: 29
Joined: Thu 04 Jun 2009 11:11

Post by pedja2 » Tue 16 Jun 2009 14:02

Email is sent to you.

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

Post by Dimon » Thu 18 Jun 2009 08:56

Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next MyDAC build.

But note: when using IndexFieldNames MyDAC employs quick sorting method, and this method can't be employed when you use incorrect value type of SearchValue (string value for Integer field).

Post Reply