Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error() returns 0 for a 1526 style error
Message
From
18/10/2005 19:31:03
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01059895
Message ID:
01060111
Views:
15
>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).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform