Knowledge Base

Blog Faq400

SQLCODE: USIAMOLO BENE

blog
Last Updated on 3 Marzo 2020 by Roberto De Pedrini Non ho l’abitudine di curiosare nel codice scritto dai colleghi, ma qualche volta mi tocca. Spesso noto un errore nell’uso di SQLCODE: è importante chiarire che il test “SQLCODE <> 0” è sbagliato. Rileggiamo un attimo quello che c’è scritto nel manuale “SQL reference”: 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. È gratis, e con lo stesso account fai domande a Willi e leggi tutto l'archivio.

Prova a chiederlo a Willi

Willi risponde usando questo articolo e gli altri contenuti di Faq400, e ti dice da dove prende ogni frase. Serve un account: è gratis.

Chi legge questo, legge anche