Pro*C SQLERROR

From: Kadda SAHNINE <ksahnine_at_fisystem.fr>
Date: Tue, 12 Oct 1999 18:23:26 +0200
Message-ID: <3803607E.764FABFB_at_fisystem.fr>



Hi !

I use the WHENEVER statement to do automatic condition checking and error handling. But it doesn't seem to work on my platform (NT 4.0, Oracle 8, Pro*C).
The following lines :

[...]

EXEC SQL WHENEVER SQLERROR DO error("Oracle error \n"); EXEC SQL DECLARE DB_NAME DATABASE;
EXEC SQL CONNECT :username IDENTIFIED BY :password AT DBNAME USING :db_string;
printf("connected to oracle \n");
[...]

with an error() procedure doesn't catch an SQL CONNECT error.

Do u know what's wrong ?

Thanx a lot.

--
K.
Received on Tue Oct 12 1999 - 18:23:26 CEST

Original text of this message