Embedded SQL in RPGILE

130 pts.
Tags:
RPG ILE
SQL Query
SQL/400
For a SELECT Query in RPG program if we get -811 SQL error, it means we have got multiple selections in our query. Is it possible to know how many records are selected from the SELECT statement from any field of SQLCA or in some other way?

Software/Hardware used:
I series

Answer Wiki

Thanks. We'll let you know when a new response is added.

From the V5R4 SQL Reference:<ul>
<li>For a CONNECT for status statement, SQLERRD(3) contains information on the connection status. See “CONNECT (Type 2)” on page 557 for more information.</li><li>For INSERT, UPDATE, REFRESH, and DELETE, shows the number of rows affected.</li><li>For a FETCH statement, SQLERRD(3) contains the number of rows fetched.</li><li>For the PREPARE statement, contains the estimated number of rows selected. If the number of rows is greater than 2 147 483 647, then 2 147 483 647 is returned.</li>
</ul>
The SQLCA (Communications Area) should define SQLERRD(3) in RPGIV and SQLER3 in RPGIII. (The SQL Reference and SQL Embedded Programming manuals describe usage for all languages.)

It’s hard to tell from what you asked if any part of that helps.

Tom

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following