Exemplo n.º 1
0
 public String verificaCargue() {
   String rta = "";
   Connection con = null;
   ResultSet rs = null;
   ConexionBD objetoConexion = null;
   CallableStatement cs = null;
   String sql = "";
   try {
     objetoConexion = new ConexionBD();
     con =
         objetoConexion.generarConexionOracle(
             GeneralDao.USUARIO_BD,
             GeneralDao.PASSWORD_BD,
             GeneralDao.NAME_SERVER,
             GeneralDao.NET_SERVICE,
             GeneralDao.ROOT_CONNECT);
     sql = "{ ? = call FX_VER_CARGUE_INFCADE }\n";
     cs = con.prepareCall(sql);
     cs.registerOutParameter(1, Types.VARCHAR);
     cs.execute();
     rta = cs.getString(1);
     cs.close();
   } catch (Exception e) {
     System.out.println("Error Sia_InformeCadeDao.verificaCargue " + e);
   } finally {
     objetoConexion.eliminacionOracle(con);
   }
   return rta;
 }
Exemplo n.º 2
0
 public String insertaInforme(Sia_InformeCadeTo objTo) {
   String rta = "";
   Connection con = null;
   ResultSet rs = null;
   ConexionBD objetoConexion = null;
   CallableStatement cs = null;
   int resultado = -1;
   String sql = "";
   try {
     objetoConexion = new ConexionBD();
     con =
         objetoConexion.generarConexionOracle(
             GeneralDao.USUARIO_BD,
             GeneralDao.PASSWORD_BD,
             GeneralDao.NAME_SERVER,
             GeneralDao.NET_SERVICE,
             GeneralDao.ROOT_CONNECT);
     sql += "{? = call FX_INSERTA_EXPEDIENTE(";
     sql += "                                p_arc_Nombre                  => ? ,";
     sql += "                                p_arc_fecini                  => ? ,";
     sql += "                                p_arc_fecfin                  => ? ,";
     sql += "                                p_arc_Codigo                  => ? ,";
     sql += "                                p_arc_Folios                  => ? ,";
     sql += "                                p_arc_Comentarios             => ? ,";
     sql += "                                p_arc_Cara                    => ? ,";
     sql += "                                p_arc_Archivador              => ? ,";
     sql += "                                p_arc_Cajon                   => ? ,";
     sql += "                                p_arc_Codigoexp               => ? ,";
     sql += "                                p_arc_Consecutivo             => ? ,";
     sql += "                                p_deps_Id                     => ? ,";
     sql += "                                p_sop_Id                      => ? ,";
     sql += "                                p_arc_Signaturatopografica    => ? ,";
     sql += "                                p_cade_puntoAten              => ? ,";
     sql += "                                p_cade_Responsable            => ? ,";
     sql += "                                p_cade_Mes                    => ? ,";
     sql += "                                p_cade_Anno                   => ? ";
     sql += "                            )}";
     cs = con.prepareCall(sql);
     cs.registerOutParameter(1, Types.VARCHAR);
     cs.setString(2, objTo.getArc_Nombre());
     cs.setString(3, objTo.getArc_fecini());
     cs.setString(4, objTo.getArc_fecfin());
     cs.setString(5, objTo.getArc_Codigo());
     cs.setString(6, objTo.getArc_Folios());
     cs.setString(7, objTo.getArc_Comentarios());
     cs.setString(8, objTo.getArc_Cara());
     cs.setString(9, objTo.getArc_Archivador());
     cs.setString(10, objTo.getArc_Cajon());
     cs.setString(11, objTo.getArc_Codigoexp());
     cs.setString(12, objTo.getArc_Consecutivo());
     cs.setInt(13, Integer.parseInt(objTo.getDeps_Id()));
     cs.setString(14, objTo.getSop_Id());
     cs.setString(15, objTo.getArc_Signaturatopografica());
     cs.setString(16, objTo.getCade_puntoAten());
     cs.setString(17, objTo.getCade_Responsable());
     cs.setString(18, objTo.getCade_Mes());
     cs.setString(19, objTo.getCade_Anno());
     cs.execute();
     rta = cs.getString(1);
     cs.close();
   } catch (Exception e) {
     System.out.println("Error Sia_InformeCadeDao.insertaInforme " + e);
   } finally {
     try {
       con.close();
     } catch (Exception e) {
     }
   }
   return rta;
 }