From: | Sabio - PSQL <slopez_pg(at)ceroriesgo(dot)co(dot)cr> |
---|---|
To: | PostgreSQL Admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Help with statement |
Date: | 2005-04-01 20:04:41 |
Message-ID: | 424DA959.3060004@ceroriesgo.co.cr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
public int cedula_actualizar(String strcedula, String strids) {
PreparedStatement ST = null;
int retVal = 0;
try {
ST = conexion.prepareStatement("UPDATE maestro_partes SET
cedula='"+strcedula+"' WHERE consecutivo_identificacion IN ("+strids+")");
retVal = ST.executeUpdate();
ST.close();
} catch (Exception e) {
System.out.println(e.getMessage());
}
return retVal;
}
When execute this function with single data like this 3434 in strids, it
works, but when is pass somethine like this: 12232,3434,3,4545,34,3
don't work, Why?
In database cedula is varchar and consecutivo_identificacion is int
From | Date | Subject | |
---|---|---|---|
Next Message | Sabio - PSQL | 2005-04-01 20:08:01 | Possible Bug in PreparedStatement |
Previous Message | Chris White (cjwhite) | 2005-04-01 19:40:29 | Help understanding VACUUM info on 7.4.5 |