load file import to load data infile

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

No hay comentarios:

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...