Re: JT400 connection string
David Gibbs via JAVA400-L <[email protected]> Mon, 30 Sep 2024 16:06:56 -0500
| Newsgroups | gmane.comp.lang.as400.java |
|---|---|
| Message-ID | <CAEStNX=HJWDTf8wpfgm81FgwcPMaCeD5cY3vYoXTF-2+F1s=hw@mail.gmail.com> |
On Mon, Sep 30, 2024 at 1:10 PM DOUGLAS ENGLANDER via JAVA400-L <[email protected]> wrote: > I have this in my Java program and it works to get a connection. I think > this is not using JT400.JAR. The connection works. But when I try to run a > SQL Insert, it says it can't find the table in the ABCDEFGH library. Which > is correct since that library does not exist. What do I need to change > here so the driver uses *LIBL instead of ABCDEFGH? > > Class.forName("com.ibm.db2.jdbc.app.DB2Driver"); > db2_conn = DriverManager.getConnection("jdbc:db2:localhost", "ABCDEFGH", > db2password); > I would suggest using JT400 ... it's a more known quantity, and people here are going to be more familiar with it. JT400 jdbc uri's look like: jdbc:as400://system-name/default-schema;properties See https://javadoc.midrange.com/jtopen/com/ibm/as400/access/AS400JDBCDriver.html david -- IBM i on Power Systems: For when you can't afford to be out of business! I'm riding in the American Diabetes Association's Tour de Cure to raise money for diabetes research, education, advocacy, and awareness. You can make a tax-deductible donation to my ride by visiting https://mideml.diabetessucks.net. You can see where my donations come from by visiting my interactive donation map ... https://mideml.diabetessucks.net/map (it's a geeky thing). I may have diabetes, but diabetes doesn't have me! -- This is the Java Programming on and around the IBM i (JAVA400-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/java400-l or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/java400-l.