Programación al Extremo

Buscar en este blog

martes, 29 de noviembre de 2011

load file import to load data infile
Fecha de Publicación:
Publicado por:
Seguir Seguir en twitter
Seguir Seguir en facebook
Seguir Seguir en Google+

Programación al Extremo : Java
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
Publicar un comentario