IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only
  • 1.  JTOpen configuration

    Posted Mon October 28, 2024 01:12 PM

    Hello, I wanted to ask something related to the Java AS400 connection driver, that is, JTOpen, and it is about whether it has a URL parameter similar to that of PostgreSQL:

    jdbc:postgresql://localhost:5432/db?reWriteBatchedInserts=true

    That allows doing SQL inserts like these:

    INSERT INTO table (name, value) values ​​("name1", "value1"), ("name2", "value2"), ("name3", "value3")

    instead of doing them like this:
    INSERT INTO table (name, value) values ​​("name1", "value1")
    INSERT INTO table (name, value) values ​​("name2", "value2")
    INSERT INTO table (name, value) values ​​("name3", "value3")

    Could someone guide me if it is possible or where I could ask to find out about it?



    ------------------------------
    Roy Martin
    ------------------------------


  • 2.  RE: JTOpen configuration

    Posted Mon October 28, 2024 02:36 PM

    Hi @Roy Martin ...

    It's pretty standard ... here's a snippet from some code I wrote last week:

    Class.forName("com.ibm.as400.access.AS400JDBCDriver");
        String db2URL = "jdbc:as400:localhost";

    db2_conn = DriverManager.getConnection(db2URL, db2_user, db2_password);

    I'm not sure in detail all the various options. There's documentation here.



    ------------------------------
    Jack Woehr
    Senior Consultant
    Seiden Group LLC
    Beulah CO
    3038478442
    ------------------------------