Subject | Re: [IBO] Can't make OnGetText call w TIBOQuery |
---|---|
Author | jwharton@ibobjects.com |
Post date | 2004-03-11T21:51:45Z |
Not sure what you will do for this. I use both TIB_Query and TIBOQuery and their respective GetText events are of a
different format and style. You would probably have to write separate ones for each that do essentially the same thing.
AssignSQLWith Search won't transfer this over in an automatic way. You will have to manually do some work to obtain
the consistency you are after.
HTH,
Jason Wharton
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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
different format and style. You would probably have to write separate ones for each that do essentially the same thing.
AssignSQLWith Search won't transfer this over in an automatic way. You will have to manually do some work to obtain
the consistency you are after.
HTH,
Jason Wharton
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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