Subject Re: [IBO] Can not cast Sender in OnError...
Author Jason Wharton
It is possible to check the class and then case out the cast. It is possible
for different class types to be the Sender of an OnError event.

If Sender is TIB_Connection then ...

Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --


"Dany Marmur" <arbit@...> wrote in message
news:avb1se$ndq$1@......
> I cannot get the statement
>
> Sender is TIB_Connection
>
> in the OnError event handler for TIB_SessionProps to evaluate to True.
Even
> though I can see in the callstack that the HandleError function is called
> from TIB_Statement.API_Execute with a TIB_Statement object for the Sender
> parameter. Somewhere on the way in all those DoHandleError (in the
debugger
> it looks like the one in TIB_Session) it starts to eval to false but I'm
not
> exactly when. I have not been able to locate where the "STATEMENT:" info
in
> ErrorMessage is added but the fact it is tells me this is something that
> should, or at least have to, happen.
>
> Does a TSession component solve the problem? How do I go about. I
> specifically want to call the StatementType property from within my error
> handling event function. I'm only using TIB_SessionProps at the moment.
>
> Thanks,
>
> /Dany
>
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>