Subject Re: [IBO] Parameter looses value on reorder
Author Florian Hector
Helen,

> What exactly do you mean by "whenever the grid is reordered". What
> are you doing in order to "reorder the grid"? (In IBO, you don't
> reorder the grid, you reorder the dataset...)

The query is a detail of a master (tabKunden). The master displays
customers, in the detail I display what they have ordered on a given
date. There is a subselect in the detail query to have a combobox
in the grid.
This is the complete SQL of the detail:

Select BestID
, BestNr
, BestEtikettNr
, ArtID
, KdnID
, BestAnzahl
, (Select ArtBezeichner from tabArtikel
where tabArtikel.ArtID=tabBestell.ArtID)
AS Artikel
, BestBemerkung
, BestDatum
, BestBezahlt
, BestDrucken
From tabBestell
Where BestDatum = :Datum

"BestID" is a generated value I have in KeyLinks, in GeneratorLinks there is
"tabBestell.BestID=GEN_tabBestell", in MasterLinks there is
"tabBestell.KdnID=tabKunden.KdnID"

"Datum" is set once upon startup of the application and whenever the user
selects a different date with a DatTimePicker, this is how it's set:
DM.qryBestell.Params.ByName('Datum').AsString
:=DateToStr(dtpBestellDatum.Date);

> Which components are we talking about here? which grid control?

The Grid is an IB_Grid. By reordering I want to say clicking on the column
header to make use of what is defined in OrderingItems.

> Do you have any OrderingLinks set up? Any OrderingItems defined? Any
> indexes in your table to support reordering?

Yes, OrderingItems is defined:
BestEtikettNr=BestEtikettNr, BestNr
BestNr=BestNr, BestEtikettNr

There are no indexes

> It makes it a lot easier to troubleshoot your problem if you provide a
> proper description of it. Include details of what reordering you are
> trying to do and what you have done so far to implement it.

Thank you for your patience

Florian