|
> 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 mailing list archive is Copyright 1997-2025 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.