I'm trying to make an update on a table which fails (as it should because of constraints). This causes an sql error.
I then try to select all rows in a table using a declare. When I check the state it says there is an sql error.
The error however is from the attempted update (I know this as it completes correctly when the update does not fail).
Is there some way to 'zero out' the sql error?
Note:
I'm finding the sql code with:
As I have service program with some helpful sql functions which would otherwise not be able to get the correct sql code.
I hope someone out there knows a way around this problem...
~Alice
I then try to select all rows in a table using a declare. When I check the state it says there is an sql error.
The error however is from the attempted update (I know this as it completes correctly when the update does not fail).
Code:
Exec SQL Declare HyppighedListe cursor for select id, tekst from FilOprHyp order by id;
Note:
I'm finding the sql code with:
Code:
EXEC SQL Get Diagnostics Condition 1 :Resultat = DB2_RETURNED_SQLCODE; // Workaround for incorrect SQLCA return Resultat;
I hope someone out there knows a way around this problem...
~Alice
Comment