SQL – SQL Data is not clearing

45 pts.
Tags:
Database programming
SQL
SQL CLOSE
Generated my sql data and proceed to load data into a subfile. It works great except for one thing every time i leave the program and return back into the program, my subfile is load with my last search criteria and i don't know how to clear the buffers or tempfiles or whatever sql does with its data behind the scene.... I've attached an example of my code. Any ideas how to clear the buffers or files or...? C/EXEC SQL C+ PREPARE SQLRUN FROM :SQLWORK C/END-EXEC C* C/EXEC SQL C+ DECLARE SHPCURSOR SCROLL CURSOR FOR SQLRUN C/END-EXEC C* C/EXEC SQL C+ OPEN SHPCURSOR C/END-EXEC C/EXEC SQL C+ FETCH NEXT FROM SHPCURSOR C+ INTO :SHPREC C/END-EXEC C* C DOW SQLCODE >= 0 AND SQLCODE <> 100 C EXSR LOADSFL C/EXEC SQL C+ FETCH NEXT FROM SHPCURSOR C+ INTO :SHPREC C/END-EXEC C ENDDO C* C/EXEC SQL C+ CLOSE SHPCURSOR C/END-EXEC C*
ASKED: October 13, 2008  7:05 PM
UPDATED: October 20, 2008  8:48 AM

Answer Wiki

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

Hi,

Do you seton *INLR when you exit the program?

Regards,

Martin Gilbert.

Discuss This Question: 2  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
  • Pablov
    *INLR is seton when i exit the program... I actually crossover the program into production and that problem went away.. I need to check my user profile in developer against production. Thanks for the input..
    45 pointsBadges:
    report
  • Gilly400
    Hi, I'd be interested to know what caused this - can you let us know if you find out? Thanks, Martin Gilbert.
    23,730 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