Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop or return?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01159807
Message ID:
01159992
Views:
13
Hi David.

>I've got a little function that if it fails I want it to stop and not continue on with the rest of the program. And I'm trying to figure out if "return" is appropriate or a try and catch block. Code:
>
>if sqlrun(lc_cmd) = "Fail"
>return
>else
>anotherfuntion(lcResult)
>endif
>
>or
>
>try
>
>sqlrun(lc_cmd)
>
>catch
>
>return
>
>end
>
>anotherfunction(lcReuslt)

To add to Fabio's comment, you can't use RETURN inside a TRY structure.

Doug
Previous
Reply
Map
View

Click here to load this message in the networking platform