Knowledge Base

Blog Faq400

SQLCODE: LET'S USE IT WELL

blog
Last Updated on 3 March 2020 by Roberto De Pedrini I don’t have a habit of browsing through the code written by colleagues, but sometimes it touches me. I often notice an error in the use of SQLCODE: it is important to clarify that the test “SQLCODE <> 0” is wrong. Let’s re-read what is written in the “SQL reference” manual: The database manager sets SQLCODE after each SQL statement (…) is executed. SQLCODE is set as follows: If SQLCODE = 0 and SQLWARN0 is blank, execution was successful. If SQLCODE = 100, no data was found. For example, a FETCH statement returned no data, because the cursor was positioned after the last row of the result table. …

Riservato agli iscritti

Per leggere l'articolo completo serve un account Faq400: è gratuito e ti dà accesso anche a Willi, l'assistente AI, e a tutta la Knowledge Base.

Prova a chiederlo a Willi

Willi, l'assistente AI della community, risponde a queste domande usando questo articolo e le altre fonti Faq400. È gratuito: iscriviti e ricevi subito la risposta.

Chi legge questo, legge anche