Delete query in Embedded SQL

2505 pts.
Tags:
Embedded SQL
I have a delete query in embedded SQL. How can I know how many records are deleted?

Answer Wiki

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

Use c+ GET DIAGNOSTICS :delrowcnt = ROW_COUNT after delete statement that should give number of deleted records

Discuss This Question: 4  Replies

 
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
  • BigKat
    C Name
    COBOL Name  ILE RPG Name
    PL/I Name   RPG/400 Name  Field Value
    
    SQLERRD(3)  SQLERRD(3)    For a CONNECT for status statement, SQLERRD(3) contains
    sqlerrd[2]  SQLER3        information about the connection status. See “CONNECT (Type 2)”
                              on page 647 for more information.
                              For INSERT, UPDATE, REFRESH, and DELETE, shows the number
                              of rows affected.
                              For a FETCH statement, SQLERRD(3) contains the number of rows
                              fetched.
                              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.
    7,935 pointsBadges:
    report
  • BigKat
    The field SQLER3 will contain the number of rows affected. This field is part of the SQLDA data structure populated for each SQL statement executed. In RPG(LE) programs, this data structure is automatically available to you.
    7,935 pointsBadges:
    report
  • TomLiotta
    This field is part of the SQLDA data structure... Minor typo? But the student/interviewee can track down the appropriate data structure from the information given. Tom
    125,585 pointsBadges:
    report
  • RamvishakRamesh
    SQLERRD(3) is a part of SQLCA
    2,505 pointsBadges:
    report

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