Reading CSV files using Java
843859Aug 3 2005 — edited Sep 13 2005Hai,
Can anyone tell me how to retrieve data from csv file using java. i tried using a Microsoft Text driver for teh text csv file & tried using "select * from sample.txt" query where sample.txt query is the csv file. While executing the abouve i got the following error:
java.sql.SQLException: [Microsoft][ODBC Text Driver] In the text file specification 'statebirds.txt', the Col1 option is invalid.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Source)
at CSVInteract.main(CSVInteract.java:42)