I have program with sql fetch. For me (I have developer powers on AS/400) it works fine, SQL CODE = 0 and records are fetched into variables.
But when other person runs my program (he is software tester and has lower powers on AS/400) he gets empty report (I checked his job under debuger, cause it is batch job) and I see that SQL CODE = -514.
SQLSTATE
26501 The statement identified does not exist. -514
What could be the problem? Why it works for me, and for him not?
EDIT: After prepare and declare cursor he has:
42501 The authorization ID does not have the privilege to perform the specified operation on the identified object. -551
And the when trying to open: -514
What is going on?
here's code:
But when other person runs my program (he is software tester and has lower powers on AS/400) he gets empty report (I checked his job under debuger, cause it is batch job) and I see that SQL CODE = -514.
SQLSTATE
26501 The statement identified does not exist. -514
What could be the problem? Why it works for me, and for him not?
EDIT: After prepare and declare cursor he has:
42501 The authorization ID does not have the privilege to perform the specified operation on the identified object. -551
And the when trying to open: -514
What is going on?
here's code:
Code:
c/exec sql c+ prepare @SRD from :WREQUS // WREQUS is statement SELECT .... c/end-exec c/exec sql c+ declare @CURS1 cursor for @SRD c/end-exec c/exec sql c+ open @CURS1 c/end-exec c SQLCOD ifge 0 //here I have code = 0, tester has code = -514 c/exec sql c+ fetch @CURS1 INTO c+ :QUMOWA , :XSTATUM , :XWARTOF, :QSTID , c+ :XSTATST , :XGRUPA , :XWARTOSC c/end-exec
Comment