您可以在SQL过程中声明一个或多个条件处理程序。
You can declare one or more condition handlers in your SQL procedure.
条件处理程序确定在出现一个条件时SQL过程的行为。
Condition handlers determine the behavior of your SQL procedure when a condition occurs. A condition might be one of the following.
对于表3左侧列的DB 2示例,如果某条sql语句失败并生成一个错误,那么控制将被传递给条件处理程序。
In the case of the DB2 example in the left column of Table 3, if a particular SQL statement fails and generates an error, control is passed to the condition handler.
具有讽刺意味的是,在许多情况下,程序甚至可能不在乎检查SELECT INTO的结果是什么,因此,条件处理程序的工作是徒劳的。
Ironically, in many cases the program may not care to even check the outcome of the SELECT INTO and the condition handler's work was in vain.
第二种方法就是具有专用的处理程序,“捕捉”各条语句所“抛出”的任何或特定错误条件。
The second method is to have dedicated handlers that "catch" any or specific error conditions thrown "by individual statements."
如果某条语句发出一个存在处理程序的条件,那么SQLSTATE和SQLCODE变量的值就可以在开始执行处理程序时获得。
If a statement raises a condition for which a handler exists, the values of the SQLSTATE and SQLCODE variables are available at the beginning of the handler execution.
如果没有为条件声明处理程序,DB 2将把控制器传递到SQL过程体中的下一个语句。
If you have not declared a handler for a condition, DB2 passes control to the next statement in the SQL procedure body.
对于处理程序,您需要定义事件(如get)、处理程序和条件。
For handlers, you define the event (such as GET), the handler, and a condition.
为了编写可用于1.0、2.0以及将来版本的样式表,可以结合使用条件和use - when来避免静态错误,不管是用什么版本的处理程序。
To write a stylesheet that will work with 1.0, 2.0, and a future version, then you can combine conditional and use-when to avoid static errors no matter which version of processor you are using.
清单12展示了一个处理程序,它将在遇到SQL警告和notfound条件时退出过程。
Listing 12 shows a handler that will exit the procedure when SQL warnings and the not found conditions are encountered.
这是一个相当简单的做法,在你的单击处理程序内部使用一个快速的条件判断。
It's fairly simple to do this with a quick conditional inside your click handlers. Here's an example jQuery compatible snippet.
第1部分:要调用的事件处理程序的条件。
Part 1: The conditions under which an event handler is to be invoked.
这种类型的处理为创建数年前想象不到的应用程序创造了条件。
This kind of processing enables the creation of applications unthinkable just a few years ago.
某些派别的信徒支持使用异常来检查参数和其他的前置条件,使用错误编码来报告程序中出错的处理。
Some disciples espouse using exceptions to check parameters and other preconditions, and error codes to report processing errors within the function.
测试数据必须能够反映应用程序处理限制、错误和限制条件。
The test data needs to be reflective of application processing constraints as well as error and boundary conditions.
如果SQL过程中有一个语句发出SQLWARNING或NOTFOUND条件,并且为相应的条件声明了一个处理程序,那么DB 2将把控制转移到相应的处理程序。
If a statement in your SQL procedure raises an SQLWARNING or NOT FOUND condition and if you have declared a handler for the respective condition, DB2 passes control to the corresponding handler.
第1部分定义要调用的事件处理程序的条件;即,它定义事件处理程序的类型。
Part 1 defines the conditions under which an event handler is to be invoked; that is, it defines the type of the event handler.
这就要求程序的设计者注意WindowsNT和2000系统下的资源限制条件的问题,从容地处理突发性事件。
To handle these incidents gracefully, the application developer should be aware of the resource constraints on typical Windows nt and Windows 2000-based systems.
由于所有消息都在代码内顺序处理,回调没有必要打断应用程序流,因此竞争条件(race condition)更少。
Fewer race conditions because the messages are all handled sequentially in the code with no need for callbacks interrupting the flow.
很难处理所有的错误条件,但是这一小小的改变能够涵盖典型Web应用程序中80%的问题。
This is hardly going to handle every error condition, but it's a simple change that covers 80 percent of the problems that can occur in a typical Web application.
例如,一个接受过一定培训、有一定积极性的程序员可以很好地找到边界条件,并且检查每一个等价类是否都处理了。
For example, a reasonably trained, reasonably motivated programmer can do a perfectly fine job finding boundary conditions and checking whether each known equivalence class is handled.
编译的预处理阶段对程序文本进行宏替换,包含进其他源文件,并进行条件编译。
A preprocessing step performs macro substitution on program text, inclusion of other source files, and conditional compilation.
程序员被按照能够创建处理多种可能的软件的能力来评判,然而不大可能的条件充斥在复杂的逻辑系统中。
Programmers are judged by their ability to create software that handles the many possible, but improbable, conditions that crop up inside complex logical systems.
说明:条件:1,不定义的处理程序规定。
本文运用MATLAB软件对测量数据处理进行了尝试,并给出条件平差中水准网平差的函数程序。
In this paper, how to apply MATLAB to process measure data is attempted and how to programme the function of adjustment by condition equations in leveling net is described.
对自由液面、水底平面和岸壁的各种组合边界条件,在程序中应用映射技巧处理。
In this program, free water surface condition and boundary condition on seabed and bank are satisfied by means of images.
附条件不起诉作为轻罪非犯罪化处理的一种起诉替代措施,具有有效化解刑事纠纷、实现审前程序分流的功能。
As a substitutive system of prosecution, non - prosecution of additional conditions can dissolve the criminal dispute effectively, and realize the function which shunt the procedure before try.
他们执行额外的错误条件检查,并在发生错误时,他们援引的错误处理程序(见参数验证)。
They perform additional checks for error conditions, and in the case of an error, they invoke an error handler (see Parameter Validation).
每个处理程序对它处理的异常类型指定某种形式的筛选条件。
Each handler specifies some form of filter condition on the type of exception it handles.
例如,一个接受过一定培训、有一定积极性的程序员可以很好地找到边界条件,并且检查每一个等价类是否都处理了。
For example a reasonably trained reasonably motivated programmer can do a perfectly fine job finding boundary conditions and checking whether each known equivalence class is handled.
应用推荐