Subject Re: [ib-support] Embedded SQL anyone?
Author Peter Faulks
On Wed, 03 Apr 2002 13:00:18 +0200 Svein Erling Tysvær
<svein.erling.tysvaer@...> wrote:

> But I don't think this is your problem, since I think -104 indicates
wrong
> syntax and your syntax appears good. Didn't your error message give any
> hint as to where in your statement it was unhappy (e.g. line xx, char
xx).

No. just an SQLCODE of -104

> It could be as simple as you forgetting to issue a SET TERM or
something.

If only!

------

So I tried something a bit different....


EXEC SQL DECLARE C5 CURSOR FOR
SELECT i.rating_factor1, rfa.descr, i.rating_factor2, rfb.descr
FROM instable i, rating_factor rfa, rating_factor rfb
WHERE i.id = :Hid AND rfa.id = i.rating_factor1 AND rfb.id =
i.rating_factor2;


EXEC SQL OPEN C5;
EXEC SQL FETCH C5 INTO :Hid1, :HrtgFDesc1, :Hid2, :HrtgFDesc2;
EXEC SQL CLOSE C5;

Now I get an SQLCODE of -501, and the isc_sql_interprete() function
returns "can't format message"

Where do I get the error codes from?

Regards