Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/12/2015, 16:52
maurikius1983
Usuario no validado
 
Fecha de Ingreso: abril-2012
Mensajes: 134
Antigüedad: 12 años, 1 mes
Puntos: 0
Error buscador Java con Derby

Hola a todos, estoy portando una aplicacion con Mysql a Derby, podeis ayudarme con este error en el buscador.

Este es el error

Código:
java.sql.SQLSyntaxErrorException: No authorized routine named 'LIKE' of type 'FUNCTION' having compatible arguments was found.
y este es el código, en Mysql funcionaba bien.

Código:
@Override
    public List<Customer> findCustomerBySelection(String field, String value) throws SQLException {
        List<Customer> listCustomer = null;
        try {
            this.connect();
            PreparedStatement st = this.link.prepareStatement("SELECT * FROM customer WHERE " + field + " LIKE ?");
            st.setString(1, "%" + value + "%");
            listCustomer = new ArrayList();
            ResultSet rs = st.executeQuery();
            while (rs.next()) {
                Customer customer = new Customer();
                customer.setIdCustomer(rs.getInt("id_customer"));
                customer.setFirstName(rs.getString("customer_first_name"));
                customer.setLastName(rs.getString("customer_last_name"));
                customer.setAddress(rs.getString("customer_address"));
                customer.setPostalCode(rs.getInt("customer_postal_code"));
                customer.setPhone(rs.getInt("customer_phone"));
                customer.setEmail(rs.getString("customer_email"));
                listCustomer.add(customer);
            }
            rs.close();
            st.close();
        } catch (Exception e) {
            throw e;
        } finally {
            this.disconnect();
        }
        return listCustomer;
    }
Muchas Gracias