Results 1 to 2 of 2
  1. #1
    Join Date
    May 2014
    Posts
    1

    Unanswered: Error query java to db2 blu

    Hello guys:

    I have a java application to query db2 blu but I get the following error:
    com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-955, SQLSTATE=57011, SQLERRMC=3

    The java connection and code is:
    PHP Code:
    String url;
    Connection con null;
    Statement stmt;
    ResultSet rs null;
    url "jdbc:db2://localhost:50001/testdb:user=userdb2;password=4&DDSG%;specialRegisters=CURRENT QUERY ACCELERATION=ELIGIBLE;";
    try {
          Class.
    forName("com.ibm.db2.jcc.DB2Driver");
          
    con DriverManager.getConnection(url);
          
    stmt con.createStatement();
          
    rs stmt.executeQuery("SELECT * FROM tablename");

    Connection to db2 is OK but the error occure in this line:
    rs = stmt.executeQuery("SELECT * FROM tablename");

    Could you help me please?

    Regards.

  2. #2
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    Check with your DBA after reviewing the page below:

    SQL0955C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •