This is a discussion on java.sql.SQLException: JZ0P1: Unexpected result type. within the Sybase forums, part of the Database Server Software category; --> I run: public final void makeSigleBackup(final int id, final String folder, final String filename, final int maxBackups, final int ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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(Unkn own Source) at com.sybase.jdbc3.jdbc.SybStatement.updateLoop(Unkn own Source) at com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(U nknown Source) at com.sybase.jdbc3.jdbc.SybPreparedStatement.execute Update(Unknown Source) at de.alfa.autoupdate.db.DataManager.makeSigleBackup( DataManager.java: 1853) at de.alfa.autoupdate.engine.ResourceUpdater.updateLo cal2DB(ResourceUpdater.java: 183) at de.alfa.autoupdate.engine.UpdateTask.load(UpdateTa sk.java:900) at de.alfa.autoupdate.engine.UpdateTask.performUpdate (UpdateTask.java: 479) at de.alfa.autoupdate.engine.UpdateTask$1.run(UpdateT ask.java:402) at java.lang.Thread.run(Thread.java:619) What does this error mean? What can do? |
| Thread Tools | |
| Display Modes | |
|
|