* Treiber, Host, User und Passwort, ueber den der Zugriff auf die
* Datenbank erfolgt.
*
- * @version $Revision: 1.21.2.2 $ $Date: 2002/11/26 01:52:55 $
+ * @version $Revision: 1.21.2.3 $ $Date: 2002/12/10 09:05:07 $
* @author $Author: mh $
*
*/
// insert into db
StringBuffer sqlBuf = new StringBuffer("insert into ").append(theTable).append("(").append(f).append(") values (").append(v).append(")");
String sql = sqlBuf.toString();
- theLog.printInfo("INSERT: " + sql);
+ //theLog.printInfo("INSERT: " + sql);
con = getPooledCon();
con.setAutoCommit(false);
pstmt = con.prepareStatement(sql);
}
}
sql.append(" where id=").append(id);
- theLog.printInfo("UPDATE: " + sql);
+ //theLog.printInfo("UPDATE: " + sql);
// execute sql
try {
con = getPooledCon();
Statement stmt = null; Connection con = null;
int res = 0;
String sql="delete from "+theTable+" where "+thePKeyName+"='"+id+"'";
- theLog.printInfo("DELETE " + sql);
+ //theLog.printInfo("DELETE " + sql);
try {
con = getPooledCon(); stmt = con.createStatement();
res = stmt.executeUpdate(sql);
freeConnection(con,stmt);
}
//theLog.printInfo(theTable + " has "+ result +" rows where " + where);
- theLog.printInfo((System.currentTimeMillis() - startTime) + "ms. for: "
- + sql);
+ //theLog.printInfo((System.currentTimeMillis() - startTime) + "ms. for: " + sql);
return result;
}
try
{
rs = stmt.executeUpdate(sql);
- theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: "
- + sql);
+ //theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: " + sql);
}
catch (SQLException e)
{
result = pstmt.executeUpdate();
}
catch (Exception e) {
- theLog.printDebugInfo("settimage :: setImage gescheitert: "+e.toString());
+ theLog.printDebugInfo("executeUpdate failed: "+e.toString());
throw new StorageObjectException("executeUpdate failed: "+e.toString());
}
finally { freeConnection(con,pstmt); }
- theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: "
- + sql);
+ //theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: " + sql);
return result;
}
try {
con = getPooledCon();
pstmt = con.prepareStatement(sql);
- theLog.printInfo("METADATA: " + sql);
+ //theLog.printInfo("METADATA: " + sql);
ResultSet rs = pstmt.executeQuery();
evalMetaData(rs.getMetaData());
rs.close();