using LOAD DATA LOCAL INFILE with java.sql
Posted by: mho salim
Date: August 01, 2005 05:08PM

I am trying to load a file onto a table in a remote database that is running MySQL version 4.04 .
Using the query String
-- LOAD DATA LOCAL INFILE 'myfile.ext' IGNORE INTO TABLE `mytable` -- through java.sql.Statement.execute() method from inside my Java program I get the error message
-- java.sql.SQLException: General error: The used command is not allowed with this MySQL version --

This same query String works fine from a Commercial SQL client on the same machine with the same database (I am using EMS MySQL Manager 3.1.01)

The Java connection is made with
-- Class.forName("org.gjt.mm.mysql.Driver");
-- Connection con = DriverManager.getConnection(db, user, password) --
where -- db="jdbc:mysql://mydatabase:3306/dbname?MYSQL_OPT_LOCAL_INFILE=1&allowUrlInLocalInfile=true" --

has anyone else seen this problem? Is there a trick to this?

Options: ReplyQuote


Subject
Written By
Posted
using LOAD DATA LOCAL INFILE with java.sql
August 01, 2005 05:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.