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



Not sure I agree with you here.  Your assumption is that you will *always*
use the AS/400 for your hardware platform.  *and* you assume that you will
*only* connect to AS/400s.  If I wanted to migrate my applications off the
400 onto some other package, I'd be hard pressed to convert the RPG and
COBOL to some other language.  On the other hand, using the '400 as a
development platform (and using SQL) allows me to offer systems on other
platforms with little to no conversion.  Finally, using RPG and COBOL
programs assumes that there is an adequate supply of COBOLers and RPGers.  I
don't know about you folks but I *certainly* don't believe that to be the
case.  In fact, the AS/400 program at the local community college is seeing
significant decline in enrollment... one of the hottest classes: Oracle and
SQL.

Having said that, I think each shop should consider carefully the decision
to use SQL or RPG and COBOL programs as their choice.  Performance is a
crucial issue, however, I find I'm bound by bandwidth, not the response of
the 400.

(getting off my soapbox)

dan



-----Original Message-----
From: Joe Pluta [mailto:joepluta@PlutaBrothers.com]
Sent: Thursday, October 04, 2001 9:21 AM
To: java400-l@midrange.com
Subject: RE: SQL update/insert for a string contain " ' "


I respectfully suggest you consider replacing SQL with calls to an RPG or
COBOL program.  While it's a little bit of upfront work, it's far easier to
maintain in the long run, and performs much better.

Joe


> -----Original Message-----
> From: Xu, Weining
>
> I am using JDBC to perform update/insert for DB2 on AS400.  The user types
> inputs from a Java GUI. For example, when user types in "Tom's desk" in a
> text field.  I will update the field with the typed string.  The partial
> code is like this:
>
> String desc = getJTextFieldDesc().getText();
>
> String update = "update myTable set DESCRIPTION = '"+desc+"'
> where ID = 1";
>
> stmt.createStatement();
> stmt.executeUpdate(update);
>
> The update will return error, since the string passed into SQL update
> statement would be 'Tom's Desk'.  The SQL hit the first closing "  '  "
> after letter m rather after letter k.
>
> Any solutions?  Thanks for your help.

_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.