I want to store data in a db but I get an error
@Override
public List<Ausentismo> list05(Date fechai, Date fechaf, Date fechaMesA, Date fechaMesS) {
List<Ausentismo> list05 = null;
String sql = "SELECT AU.COD_MOTIVO, AU.CODIGO, AU.FECHA_SALIDA, AU.FECHA_RETORNO, AU.DIAS_CIA \n"
+ "FROM RH_AUSENTISMO AU WHERE FECHA_SALIDA BETWEEN '01-07-2018' AND '31-08-2018' \n"
+ "AND FECHA_RETORNO BETWEEN "+fechai+" AND '30-09-2018' AND AU.COD_MOTIVO ='LS'";
try {
Connection cn = db.getConnection();
PreparedStatement st = cn.prepareStatement(sql);
that's the query
private void btnGenerarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Date fechaf = (Date) fechaFinal.getDate();
Date fechai = (Date) fechaInicio.getDate();
Date mesSig = (Date) mesSiguiente.getDate();
Date mesAnt = (Date) mesAnterior.getDate();
snl snl = new snl();
snl.grabar_snl(fechai ,fechaf, mesSig,mesAnt,a, m);
That's where he sent from the jdchooser and the erroe that comes out is this.
Error: ORA-03115: unsupported network datatype or representation
I'm waiting for your help.