Hi all,
I just read some code where the "sqlcode" from DB2 was handled individually (0, 100, -502, ...).
Shouldn't there be some named consts for those sqlcodes (ok, not_found, duplicate_key, ...)?
Has anybody done that? Pros and cons? Just want to avoid creating named consts but a) they already exist b) there are pitfalls.
br woecki
Edit: to make my question clearer:
Instead of
exec sql ...
select(sqlca.sqlcode);
when(100) ...
when(0) ...
i'd like to write
exec sql ...
select(sqlca.sqlcode);
when(emtpy) ...
when(ok) ...
well, ok, the difference is minimal but i would like it anyway ...
woecki