Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reading CSV files using Java

843859Aug 3 2005 — edited Sep 13 2005
Hai,

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)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2005
Added on Aug 3 2005
4 comments
1,250 views