theType = metadataTypes[i];
if (theType == java.sql.Types.LONGVARBINARY) {
-/* InputStream us = rs.getAsciiStream(i + 1);
+ InputStream us = rs.getAsciiStream(i + 1);
if (us != null) {
InputStreamReader is = new InputStreamReader(us);
char[] data = new char[32768];
else {
theResult = null;
}
-*/ theResult = null;
}
else {
theResult = getValueAsString(rs, (i + 1), theType);
}
} catch (IllegalAccessException e) {
throwStorageObjectException("Kein Zugriff! -- " + e.toString());
-/* } catch (IOException e) {
+ } catch (IOException e) {
throwStorageObjectException("IOException! -- " + e.toString());
-*/ } catch (InstantiationException e) {
+ } catch (InstantiationException e) {
throwStorageObjectException("Keine Instantiiierung! -- " + e.toString());
-/* } catch (SQLException sqe) {
+ } catch (SQLException sqe) {
throwSQLException(sqe, "makeEntityFromResultSet");
return null;
-*/ }
+ }
return returnEntity;
}
throws SQLException,StorageObjectException
{
long startTime = System.currentTimeMillis();
- String sql = "SELECT count(*) FROM "+ theTable + " where " + where;
+ String sql = "SELECT Count(*) FROM "+ theTable;
+ if (where != null && !(where.length() == 0))
+ sql = sql + " where " + where;
Connection con = null;
Statement stmt = null;
int result = 0;