aspose file tools*
The moose likes JDBC and the fly likes Load Data Infile Issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Load Data Infile Issues" Watch "Load Data Infile Issues" New topic
Author

Load Data Infile Issues

Jesse Kelm
Greenhorn

Joined: Sep 06, 2011
Posts: 11
I am attempting to load data from a .txt file that is csv formatted into a MS Access Database. I tried doing this with the INSERT statemetnt with success, but the processing is very slow. When searching on how to speed it up, it was suggested that using LOAD DATA INFILE was much quicker. When attempting to do this I receive an error of an invalid SQL statement. Here is my code and error message:



java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
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.executeUpdate(Unknown Source)
at ConnectDatabase.main(ConnectDatabase.java:41)


Thanks in advanced for any insight as to what might be wrong.


Jesse Kelm
Greenhorn

Joined: Sep 06, 2011
Posts: 11
Nm...I found out this won't work with MS Access. That is the issue.
Thanks Everyone!
 
Don't get me started about those stupid light bulbs.
 
subject: Load Data Infile Issues