Subject Re: [IBO] On Prepare change exception
Author Paul Gallagher
Yes, I should probably fix the cause of the error, not trap the exception.
But, my code below:

Try
IB_Query1.Open //error happens here
Except
HandleError //this never gets triggered
end;

Why or how can the error be caught with the Try...Except?



""Jason Wharton"" <jwharton@...> wrote in message
news:aqg72s$hfc$1@......
> Paul,
>
> This error would be clarified to you by examining the SQL Trace monitor.
> Your SELECT statement and KeyLinks need to be defined. Seems you must have
a
> JOIN or something.
>
> Regards,
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
> -- We may not have it all together --
> -- But together we have it all --
>
>
> "Paul Gallagher" <paul@...> wrote in message
> news:aqg5k0$gof$1@......
> > I have a situation with an IB_Query in which I am changing a parameter.
> > RefeshOnParamChange is true. The query has it's key source and keylinks
> set
> > to another query. Problem is there are instances in which I get a
> "multiple
> > rows in singleton select" error. The error I believe is caused from
having
> > an empty result set. Not sure why I get the error I am getting.
> >
> > I am having trouble figuring out a way to trap for this error. I have
> tried
> > manually closing the dataset with RefreshOnParam set to false, then
change
> > parameters and using a Try...Except on the open method, but the error
does
> > not get raised in the open method.
> >
> > Anyone got some insight on this?
> >
> > Thanks,
> > Paul
> >
> >
> >
> >
>
___________________________________________________________________________
> > 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/
> >
> >
> >
>
>
>
>
___________________________________________________________________________
> 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/
>
>
>