Error saving data in access: "can not write indexes of this type due to unsupported collating sort order"

1

Hello I am learning on my own to access a database, insert, delete, update, etc, in this case I use Access as a database but I have a problem when inserting data in the table, it generates the following error:

How can I solve it? Here is my code

   public class Insertar {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String ruta = "C:\Users\root\Documents\BDPrueba.accdb";
        Connection conectar = null;
        Statement mistatement = null;

        try {
            conectar = DriverManager.getConnection("jdbc:ucanaccess://" + ruta, "", "");
            System.out.println("Conexion Exitosa");
            mistatement = conectar.createStatement();
            String nombres = JOptionPane.showInputDialog("Digite Los Nombres");
            String apellidos = JOptionPane.showInputDialog("Digite los apellidos");
            String id = JOptionPane.showInputDialog("Digite la Identificacion");
            String instruccion = "INSERT INTO Administradores (Nombres,Apellidos,Identificacion) VALUES('" + nombres + "', '" + apellidos + "', '" + id + "')";
            mistatement.executeUpdate(instruccion);
            System.out.println("Insertado con Exito");

        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "Error: " + e.getMessage());
        }
    }

}
    
asked by Steven Camargo 14.02.2018 в 22:40
source

1 answer

1

There is a problem with the collation defined for ordering,

  

can not write indexes of this type due to unsupported collating sort   order

the solution is to define a "General" ordering .

Open the database to edit the following property, go to File > Options > General > in the option New database sort order changes to General or General-Legacy

    
answered by 14.02.2018 / 23:19
source