× 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.



> From: Konrad Underkofler
>
> We are doing a dynamic prepare of a statement to update a record
> and have found one field can contain the dreaded single quote.

I know this isn't exactly what you're asking, but have you thought of using
an updatable cursor with JDBC?  With JDBC 2.0, you can position to a row and
update individual columns in the row, then update the entire row.  It's
actually pretty darned powerful.  Do a select getting the individual record
into result set "rs", update the fields, then update the row:

        rs = stmt.executeQuery("SELECT ... FOR UPDATE");

        rs.updateObject("BLCUSN", cusnum);
        // (...update other fields...)

        rs.updateRow();

        rs.close();

You can also iterate through the result set and update records one at a time
if you need to do multipel updates.  I don't know that there's an equivalent
in embedded SQL.

Again, not quite appropriate for the RPG400 list, but I wanted to present
the option.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.