Subject | Re: [IBO] onpreparesql & odd behaviour |
---|---|
Author | Daniel Rail |
Post date | 2002-06-28T18:23:06Z |
At 28/06/2002 02:50 PM, you wrote:
but didn't know what it's used for, the help file wasn't too helpful for
me. Now, I know one of it's uses.
Thanks Heri for the detailed information.
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)
>Nice to hear that you have found a workaround (isolating FQueryList asI can confirm that the above works. I did see the TMethod.Data property,
>global variable).
>
>This is what I assumed. I never used this RTTI methods. But what I can see:
>there is nowhere a reference to self (datamodule) when calling
>SetMethodProp. When executing comes into QueryOnPrepareSql the FQueryList
>cannot be referenced because there is no reference to the class (remember:
>every Method of a class has as hidden first parameter a reference to self;
>callbacks like DelphiEvents must supply this reference explicitely).
>
>What happens if you supply
> M.Data := self
>after M.Code := MethodAddress(...)
>?
but didn't know what it's used for, the help file wasn't too helpful for
me. Now, I know one of it's uses.
Thanks Heri for the detailed information.
>But it should be much more easier, since you have already checked if theIt's true that this would be the easiest way.
>component is a TIBODataSet:
>
>if(Components[I] is TIBODataSet) then
> TIBODataset(Components[I]).OnPrepareSQL := QueryOnPrepareSql;
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)