×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 07/12/2016 11:51:06
AM:
I have a procedure where I use the SQL PREPARE repeatedly on a file. I
need
to close and open the prepared SQL statement to allow me to select new
parameters each time.
The program opens and closes the cursor many times as it runs.
1. How do I resolve the message?
2. Is there another way to do this?
If you can use parameter markers then you don't have to PREPARE
multiple times. The changed parameters would be supplied in the cursor
OPEN statement. However, if you're changing part of the SQL statement
that does not support parameter markers (such as the schema [library]
associated with the referenced table or view, then a new PREPARE will be
required. However, as long as you actually CLOSE the cursor before you
attempt to PREPARE again, then this should work just fine. The CLOSE
frees up the prepared statement for reuse.
Sincerely,
Dave Clark
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.