Subject Disappearing properties
Author Aage Johansen
IBO/3.6Cd + Delphi/5 + Win2k

The TIB_Query below works fine. But when the SQL property is replaced (at
run time) with a similar query (or, even the same query), some properties
of the TIB_Query seem to get wiped out.
These properties are: FieldsCharCase and FieldsVisible.
Additionally, the InsertSql doesn't seem to work any more: The SLNR value
is (somehow) set to zero and (maybe because of further processing in the
BeforePost event) things go south.

If I - after replacing the SQL text - also explcitly puts the correct
values back into FieldsCharCase and FieldsVisible everything seem to work
properly again.
FieldsVisible.Add('ID=F');
FieldsVisible.Add('SLNR=T'); /* Not really necessary */
FieldsCharCase.Add('LAND=UPPER');
-- ID is the primary key of table DISTRIB
-- SLNR is a "foreign key" (sort of - not _declared_ as such)

I've struggled with this for some time, and would appreciate an explanation
(or fix, if it is a bug in IBO).


Regards,
Aage J.



Here is the query:
select
D.LAND, D.UTGAVE, D.U_DISTR, D.REGNR, D.RDATO,
D.LANSERT, D.ALDER, D.UTGIVER, R.UTGIVER as RKV,
D.RETTIGHET, D.LABEL, D.SP_TID,
D.PRIS, D.F_BILDE, D.F_LYD, D.TNR,
T.TITTEL, D.BARCODE,
D.KOPIER, D.K_DATO, D.DIV, D.STATUS,
D.FORBUDT, D.SLNR, D.ID
from
DISTRIB D left outer join UTGAVE_SORT U on D.UTGAVE = U.UTGAVE
left outer join TITLER T on D.TNR = T.TNR
left outer join REKV R on D.UTGIVER = R.KODE
and D.LAND = R.LAND
where D.SLNR = :SLNR
and Upper(D.UTGAVE) not in ('KINO','INST')
order by D.LAND collate no_no, U.RANG, D.RDATO, D.LANSERT
for update

The only change I make is adding another line in the where clause (and
D.LAND = '<some value>') just before the OrderBy clause.