java.sql.SQLException: JZ0P1: Unexpected result type.

Discussion in 'Java' started by Bumsys@gmail.com, May 30, 2008.

  1. Guest

    I run:
    public final void makeSigleBackup(final int id, final String folder,
    final String filename, final int maxBackups, final int
    type)
    throws SQLException {
    // TODO _ backuping
    int clientId = info.getClient().getId();
    log.info("makeSigleBackup");
    if (maxBackups == 0) {
    deleteResource(id, folder, filename, 0, clientId);
    return;
    }
    String query = "update "
    + getFullTableName(Tables.RESOURCE)
    + " set backupno = backupno + 1 where application_id
    = ? and backupno = 0 and path = ? and name = ? and type = ?"
    + " and client_id = ?";
    logQuery(query);
    logQueryParameter("application_id = " + id);
    logQueryParameter("path = " + makePathToDB(folder));
    logQueryParameter("name = " + filename);
    logQueryParameter("type = " + type);
    logQueryParameter("client_id = " + clientId);
    PreparedStatement ps =
    manager.getConnection().prepareStatement(query);
    ps.setInt(1, id);
    ps.setString(2, makePathToDB(folder));
    ps.setString(3, filename);
    ps.setInt(4, type);
    ps.setInt(5, clientId);
    int numberOfRows = ps.executeUpdate();
    logNumberOfRows(numberOfRows);

    ps.close();
    }
    and I have:
    5/30/08 6:00:55 PM INFO de.alfa.autoupdate.db.DataManager -
    makeSigleBackup
    5/30/08 6:00:55 PM INFO de.alfa.autoupdate.db.DataManager - sql
    query: update dbo.au_res set backupno = backupno + 1 where
    application_id = ? and backupno = 0 and path = ? and name = ? and type
    = ? and client_id = ?
    5/30/08 6:00:55 PM DEBUG de.alfa.autoupdate.db.DataManager -
    parameter: application_id = 101
    5/30/08 6:00:55 PM DEBUG de.alfa.autoupdate.db.DataManager -
    parameter: path = app
    5/30/08 6:00:55 PM DEBUG de.alfa.autoupdate.db.DataManager -
    parameter: name = test.rar
    5/30/08 6:00:55 PM DEBUG de.alfa.autoupdate.db.DataManager -
    parameter: type = 0
    5/30/08 6:00:55 PM DEBUG de.alfa.autoupdate.db.DataManager -
    parameter: client_id = 11
    5/30/08 6:00:56 PM ERROR de.alfa.autoupdate.engine.UpdateTask - Error
    java.sql.SQLException: JZ0P1: Unexpected result type.
    at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
    at com.sybase.jdbc3.jdbc.SybStatement.updateLoop(Unknown Source)
    at com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(Unknown Source)
    at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeUpdate(Unknown
    Source)
    at de.alfa.autoupdate.db.DataManager.makeSigleBackup(DataManager.java:
    1853)
    at
    de.alfa.autoupdate.engine.ResourceUpdater.updateLocal2DB(ResourceUpdater.java:
    183)
    at de.alfa.autoupdate.engine.UpdateTask.load(UpdateTask.java:900)
    at de.alfa.autoupdate.engine.UpdateTask.performUpdate(UpdateTask.java:
    479)
    at de.alfa.autoupdate.engine.UpdateTask$1.run(UpdateTask.java:402)
    at java.lang.Thread.run(Thread.java:619)

    What does this error mean? What can do?
     
    , May 30, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ck388
    Replies:
    0
    Views:
    3,835
    ck388
    Jun 6, 2003
  2. gbattine
    Replies:
    0
    Views:
    754
    gbattine
    Oct 18, 2006
  3. mahesh
    Replies:
    3
    Views:
    4,759
    cb_1987
    Apr 6, 2010
  4. Michael Tan
    Replies:
    32
    Views:
    1,052
    Ara.T.Howard
    Jul 21, 2005
  5. Andy Tolle
    Replies:
    7
    Views:
    246
    Andy Tolle
    Nov 15, 2010
Loading...

Share This Page