> I have some trouble with store procedure working on OnLine 5.01
> ( with Hebrew support ).
>
> How can I recognize a situation in store procedure in case a simple
> SELECT statement returns NOTHING ?
>
> It looks like sqlca.sqlcode == SQLNOTFOUND ( embedded C ) , but there
is
> not
> sqlca in store procedure( SQL ).
Correct - there is no sqlca record known to SPL. There's an SQL extension
in V6+ called DBINFO that gets you *some* sqlca-like info, but basically
the way you test for NOTFOUND in SPL is to see whether a NULL value was
returned into the primary key field.
Herein lies another pitfall - if you define a procedure variable LIKE a
database column which was created NOT NULL, you will get error -1225 when
the engine tries to put the null into it. So you have two possible
methods - either don't use DEFINE ... LIKE for the primary key, or
otherwise make handling exception -1225 your way of testing for notfound
on that statement.
akent@cix.compulink.co.uk (Andy Kent)
------------------------------------------------
Freelance Informix Database Specialist,
Redland, Bristol, England