Subject | Can't make OnGetText call w TIBOQuery |
---|---|
Author | dmarmur2002 |
Post date | 2004-03-11T15:40:39Z |
Hi!
I have tried two ways of writing an GetText event for an TIBOQuery.
Note that it works great with TIB_Query.
1st try:
IBOQuery.AssignSQLWithSearch(IB_MainQuery);
IBOQuery.InternalDataset.AfterPrepare := IB_QueryAfterPrepare;
IBOQuery.Prepare;
The IB_QueryAfterPrepare assigns an IB_GetText event that works
greate with TIB_Query (actually the IB_MainQuery). The
IB_QueryAfterPrepare method gets called and does its work properly.
IB_GetText does not get called.
2nd try:
IBOQuery.AssignSQLWithSearch(IB_MainQuery);
IBOQuery.Prepare;
// FieldCount = 0 here
IBOQuery.Open;
// FieldCount > 0 here
for ii := 0 to IBOQuery.FieldCount - 1 do
IBOQuery.Fields[ii].OnGetText := FieldGetText;
FieldGetText is of "type" TFieldGetTextEvent. It does not get called.
What is the proper way of substituting text when working with
TIBOQuery?
Thanks a lot,
/Dany
I have tried two ways of writing an GetText event for an TIBOQuery.
Note that it works great with TIB_Query.
1st try:
IBOQuery.AssignSQLWithSearch(IB_MainQuery);
IBOQuery.InternalDataset.AfterPrepare := IB_QueryAfterPrepare;
IBOQuery.Prepare;
The IB_QueryAfterPrepare assigns an IB_GetText event that works
greate with TIB_Query (actually the IB_MainQuery). The
IB_QueryAfterPrepare method gets called and does its work properly.
IB_GetText does not get called.
2nd try:
IBOQuery.AssignSQLWithSearch(IB_MainQuery);
IBOQuery.Prepare;
// FieldCount = 0 here
IBOQuery.Open;
// FieldCount > 0 here
for ii := 0 to IBOQuery.FieldCount - 1 do
IBOQuery.Fields[ii].OnGetText := FieldGetText;
FieldGetText is of "type" TFieldGetTextEvent. It does not get called.
What is the proper way of substituting text when working with
TIBOQuery?
Thanks a lot,
/Dany