Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop or return?
Message
From
05/10/2006 14:19:16
 
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:
01159811
Views:
14
>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)
>
>Hope this makes sense, thanks in advance.

if sqlrun() returns an error code, the first is the best.
Previous
Reply
Map
View

Click here to load this message in the networking platform