This function can be called anywhere within a TRY statement, and it returns the SQLSTATE anywhere in the error handler.
Diese Funktion kann an einer beliebigen Stelle innerhalb einer TRY-Anweisung aufgerufen werden und gibt den SQLSTATE-Wert an einer beliebigen Stelle in der Fehlerbehandlungsroutine zurück.
Generally, if a SQL statement in a procedure or trigger fails, the procedure or trigger stops executing and control returns to the application program with an appropriate setting for the SQLSTATE and SQLCODE values.
Im Allgemeinen gilt: Wenn eine SQL-Anweisung in einer Prozedur oder einem Trigger fehlschlägt, beendet die Prozedur oder der Trigger die Ausführung und gibt die Kontrolle mit einer entsprechenden Einstellung der Werte SQLSTATE und SQLCODE an das Anwendungsprogramm zurück.
An exception handler can use the SQLSTATE or SQLCODE special values to determine why a statement failed.
Eine Ausnahmeroutine kann mit den SQLSTATE- oder SQLCODE-Spezialwerten ermitteln, warum eine Anweisung fehlgeschlagen ist.
For example, to track the SQLSTATE value when debugging stored procedures, just enter SQLSTATE.
Wenn Sie z.B. den Wert von SQLSTATE überprüfen wollen, geben Sie einfach SQLSTATE ein.
In OuterProc, the statement following the error assigns the SQLSTATE value to the variable named res.
In OuterProc weist die Anweisung nach dem Fehler den SQLSTATE-Wert der Variablenres zu.
You have to use WHEN ANY and test the SQLSTATE variable within the handler.
Sie müssen WHEN ANY verwenden und die Variable SQLSTATE im Handler testen.
In OuterProc, the statement following the error assigns the SQLSTATE value to the variable named.
In OuterProc weist die Anweisung nach dem Fehler den SQLSTATE-Wert der Variablen zu.
Contenu potentiellement sensible ou inapproprié
Les exemples vous aident à traduire le mot ou l’expression cherchés dans des contextes variés. Ils ne sont ni sélectionnés ni validés par nous et peuvent contenir des mots ou des idées inappropriés. Signalez des exemples à modifier ou à retirer. Les traductions potentiellement sensibles, inappropriées ou familières sont généralement marquées de rouge ou d’orange.