Help: Jumping panels/rows in DBCtrlGrid/DBGrid at TQuery.Close+Open+Locate

Are there anyone of you who happens to know if it is
possible to control which row/col/cell will correspond
to a certain PanelIndex in DBCtrlGrid ?

My problem is, since I have a DBCtrlGrid connected to a Query
(I must sort my records on a character field, and the damn
TTable.IndexFieldNames results in duplicated/unordered records),
and since a Query does not support the refresh method (at least
it says that "table does not support the operation because it is
not uniquely indexed" even though the table I query has a primary
key) I must do Close & Open every time I want to refresh my data.
I want the same cell in the CtrlGrid to be selected both before
and after the Close/Open part though. As it is now, when a cell
is selected I save the DB-search-value, I do Close/Open and then
I search on the saved value as in the following code:

  lastIx := qryOrderedCraneStatus['CRANE_ID'];
  myQuery.Locate('CRANE_ID', lastIx, [loCaseInsensitive]);

The same record is selected after the operation, but the PanelIndex
row/col location is different depending on what it was before the

Is there a way to connect/scroll current record or PanelIndex to a
certain row/column (I use 4x3 in my DBCtrlGrid); alt. is there a
way to refresh the dataset in a TQuery without Close/Open and
without changing the database server; alt. is there a way to
order the records in a TTable without getting duplicates
(workaround the bug) ?

There is a similar problem with TDBGrid (current/selected row jumps
up or down some positions every time a Close-Open-Locate is done).

I have struggled with this problem for 3 months now. Hysteria !
I'm using Delphi 3 on a P133/NT4.

Thanks in advance
/Mickey W

-----== Posted via Deja News, The Leader in Internet Discussion ==-----   Now offering spam-free web-based newsreading