? SQLCA.SQLCODE and DB-Procedure
Posted in 1997
Topics: Stored Procedures & SPL, Error Codes & Troubleshooting
Hallo,
I need some help.
I work with Delphi 1.02 C/S and Informix. After working (insert,
delete) with TQuery and SQL, I need the SQLCA.SQLCODE from Informix.
For the SQLCA.SQLERRD I use a stored procedure at the Informix-Server
and it works.
CREATE PROCEDURE sqlca_proc()
RETURNING INT; DEFINE zahl INT;
LET zahl = DBINFO('sqlca.sqlerrd1');
RETURN zahl;
END PROCEDURE
The same with SQLCA.SQLCODE don't work.
CREATE PROCEDURE sqlca_error()
RETURNING INT; DEFINE zahl INT;
LET zahl = sqlca.sqlcode;
RETURN zahl;
END PROCEDURE
The problem is, that the SQLCA.SQLCODE is integer but the procedure
can't SQLCA.SQLCODE into zahl. The error is: char to integer.
Can someone help me. What is wrong in the prodeure sqlca_error ???
Is there an other way to access the SQLCODE to delphi ??
frank
--------------------------------------------------------
Frank Tschirpke Danckelmannstr.48
email frank@PC50.zrz.tu-berlin 14059 Berlin
http://www.cs.tu-berlin.de/~tschirpk 030/3256426
--------------------------------------------------------