Well the first thing we do is select the file with a JFileChooserWhich contains a method that returns the file path, but this route is for example: "C: \ WINDOWS \ car.csv" then concatenate shows no error because it is at runtime. But what did I do to solve solving the problem here:stmt.executeUpdate ("LOAD DATA LOCAL INFILE \ '" + jTextFieldGuardar.getText (). replace ("\ \", "/") + "\'"+ "REPLACE INTO TABLE cadastral fields terminated by \ ', \'"+ "Enclosed by \ '\' \ '"+ "Lines terminated by \ '\ \ r \ \ n \'"+ "IGNORE 1 LINES");Where jTextFieldGuardar.getText () is a field that contains the file path which replacement with a slash (/) to be recognized and thus can be sent to the server.This solves the problem of LOAD DATA INFILE
Suscribirse a:
Enviar comentarios (Atom)
Mi primer Reporte en Ireport usando Java , Maven y NetBeans Generar PDF Versión WEB
Mi primer Reporte en Ireport usando Java , Maven y NetBeans Generar PDF Versión WEB Estructura del proyecto Listado de rutas de car...
-
Mi primer Reporte en Ireport usando Java , Maven y NetBeans Generar PDF Versión WEB Estructura del proyecto Listado de rutas de car...
-
Ahora crearemos los formularios para la creación, eliminación, lectura, y actualización de las marcas ingresarMarca.php <?...
-
Vídeo tutorial de Cómo cambiar el tema (theme) de NetBeans de Blanco a Negro( (White to Dark).
No hay comentarios:
Publicar un comentario