Created
April 4, 2018 11:35
-
-
Save n0rek/14fcb90eb20a1b7c771ac9685457ad18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<String[]> rows = new CsvParser(settings).parseAll((fileopen.getSelectedFile()), "UTF-8"); | |
for (String[] row : rows) { | |
for (String columnValue : row) { | |
try { | |
Statement statement = conn.createStatement(); | |
statement.executeUpdate("INSERT INTO dbo.Szyby_temp(Nr_zlec_klienta, Nr_ref_klienta, Szerokosc, Wysokosc, Ilosc, Opis_dodatkowy, Data_importu) " | |
+ "VALUES (" + "'" + columnValue + "'" + "," + "'" + columnValue + "'" + "," + "'" + columnValue + "'" + "," + "'" | |
+ columnValue + "'" + "," + "'" + columnValue + "'" + "," + "'" + columnValue + "'" + "," + "getdate())"); | |
} catch (SQLException ex) { | |
Logger.getLogger(Glass_search.class.getName()).log(Level.SEVERE, null, ex); | |
JOptionPane.showMessageDialog(null, ex, "ERROR", JOptionPane.ERROR_MESSAGE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment