Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bad Connection
Message
 
 
To
02/04/2003 19:40:56
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Miscellaneous
Thread ID:
00773346
Message ID:
00773366
Views:
16
James,

You can use TRY ENDTRY to ignore errors.
    TRY
	SQLDISCONNECT(lnCon)
    CATCH
    ENDTRY
>Sergey
>
>What I need is to go through all the items in collection and make sure the connection is closed. My understanding of try endtry is that once the error has occured there is no way to get back to the executing code. Is my understanding incorrect?
>
>Thanks.
>
>
>>James,
>>
>>You cannot overwrite Error() method in effect with ON ERROR command. You can use new TRY ... ENDTRY error handler instead.
>>
>>>VFP8.0 RTM
>>>I have a connection class that I use for my apps to manage mulitple connections to a database. In my distroy method I call a method that closes all database connections. I have the following code.
>>>
>>>
>>>
>>>llErr = .f.
>>>ON ERROR llerr = .t.
>>>FOR EACH lnCon IN this.ocollection
>>>  SQLDISCONNECT(lnCon)
>>>NEXT
>>>ON ERROR &lcError
>>>
>>>
>>>
>>>SQLDISCONNECT(lnCon) Still calls my error method and what I want is to just bypass the error and go on.
>>>
>>>Thanks for your help.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform