Page 1 of 1

Mytable: Locate only searches forward?

Posted: Wed 17 Nov 2004 23:24
by sean
Hi,

I've migrated many PDOX Ttables to MyTable, and I use "Locate" for searching for a row. I've now a situation within a MyTable, where Locate only searches forward, returning false if the target if before the current row.

Unidirectional=flase, by the way.

Why? Is this a bug?

Sean

Re: Mytable: Locate only searches forward?

Posted: Thu 18 Nov 2004 08:13
by Ikar
We couldn't reproduce the problem. Please send us complete small sample to demonstrate it and include script to create server objects.

Please supply us following information

- Exact version of Delphi, C++ Builder or Kylix
- Exact version of MyDAC. You can see it in About sheet of TMyConnection Editor
- Exact version of MySQL and MySQL client libary (libmysql.dll). You can see it in Info sheet of TMyConnection Editor

Posted: Thu 18 Nov 2004 10:49
by GEswin
I also noticed that Locate has some weird problem. Normally it works, but from time to time it doesn't. Perhaps in a grid i do 10 locates, and at 11th locate it doesn't work. I'm not being able to reproduce this as a demo sample, neither find any asociation of the problem to any procedures.

Locate sometimes does not work

Posted: Thu 18 Nov 2004 19:23
by Guest
Hi

I have also found a problem .Locating on time fields.

The problem semed to be related to the decimal represenation of the time being a recurring decimal. Finite length decimals were not a problem.


To get around this I now use string fields for the time and I have not had an occurrance of an unreliable Locate.

grahamm

locate problems

Posted: Thu 18 Nov 2004 20:42
by boran
> We couldn't reproduce the problem. Please send us complete small sample to demonstrate it and include script to create server objects.

It a big application, I can't do that easily at all. Basically I have a query in a grid that shows a subset of records, when I click on a record a second window opens with an edit screen for that record. The second screen uses the MyTable, and the first screen does a locate on Mytable before opening the second edit screen.
Its probably some kind of interaction problem between the query and table, since on the edit screen iteslef I can locate within the table fine).
Looks like maybe the cursors are blocking earch other or limiting locates, does that make sense.?

> Exact version of Delphi, C++ Builder or Kylix
Delphi 7.01

> Exact version of MyDAC. You can see it in About sheet of TMyConnection Editor
3.30.0.12 (a week or two old)

> Exact version of MySQL and MySQL client libary (libmysql.dll). You can see it in Info sheet of TMyConnection Editor
4.1.3 direct

Posted: Fri 19 Nov 2004 15:35
by Paul
Please specify the type of fields in the table and type of parameter passed to Locate. If possible, please send to MyDAC support email address small demo project to demonstrate how you call Locate method and pass its parameters. What are the values of TMyTable, TMyQuery properties?

Re: locate problems

Posted: Mon 22 Nov 2004 13:29
by Ikar
Looks like maybe the cursors are blocking earch other or limiting locates, does that make sense.?
Is it possible that you use FetchAll = False somewhere?