ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Java compile error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Java compile error

    I'm trying to come up with a way to read a bunch of SQL tables into iSeries DB. I started playing with some code from Eitan Rosenberg from search400 and I get this error about an unclosed literal. I did a small amount of Java several years ago, but I don't remeber how to handle this. Attempt is to get quotes into a string.

    BTW - If there is an easier way, I am open to other suggestions. This is a one-shot to get 250 tables from SQL server to iSeries.

    Code:
           value = """ +
    resultSet.getString(index) + """;

  • #2
    Re: Java compile error

    You need to use the escape char.

    value = "\'" +
    resultSet.getString(index) + "\'";
    Predictions are usually difficult, especially about the future. ~Yogi Berra

    Vertical Software Systems
    VSS.biz

    Comment

    Working...
    X