>Hi
>
>I wonder if any body can shed any light on this one?
>
>I have two views, which share a connection, the first view requeries it's data and ties up the connection. A second view attempts to download it's data and raises a busy style connection error.
>
>This is fine and I have a method implemented that tests the busyness of the connection and does the right thing, this isn't the problem.
>
>What I'm seeing is that when the second view attempts to use the connection my error handler traps the error but error() equals 0 when I would expect it to be 1526
Depends on how do you trap the error. As Fabio stated, error() works in On Error routines - but if you have an error method in your class, or use try/end block, error() won't be refreshed. You either accept the error code as a parameter to your error method, or check aerror() or the exception object (in the try/end case).