Hi guys,

I have got a question regarding LOAD DATA INFILE.

1. I want to import a txt file into mysql database.
when I use the following query in the mysql> prompt its fine.
which is

when I do it java I am getting error

Error
-----------
java.sql.sqlException: General error message from server:
"File 'D:/Sen.txt' not found <ErrCode: 2>"


But the file exists
Code:
Code:
try {
           con = DriverManager.getConnection(url, "root", "");
            stmt = con.createStatement();
            stmt.executeUpdate(createString);
            String filename = "D:/Sen.txt";
            String tablename = "IMPORT";
stmt.executeUpdate("LOAD DATA INFILE \"" + filename + "\" INTO TABLE " + tablename + " FIELDS TERMINATED BY ','");
            stmt.close();
            con.close();
}
My text file(Sen.txt) is like this...

abc,1
bcd,2
adf,3

I dont know why its say like that
Can anyone help me out in this...

thanks...
senthil.