Help with statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



   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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux