-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ahmed S K Anis wrote:
Thanks Mark,

I tried to work with the latest driver. 3.0.4
Now it gave error shown below .   Also see code snippet below at the
end

Error code is0
estoredata1.txt'for 'LOAD DATA LOCAL INFILE' command.Due to underlying
IOExcepti
on:

** BEGIN NESTED EXCEPTION **

java.io.FileNotFoundException
estoredata1.txt (The system cannot find the file specified)

STACKTRACE:

estoredata1.txt (The system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:59)
        at com.mysql.jdbc.MysqlIO.sendFileToServer(MysqlIO.java:1505)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:964)
        at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:911)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:1777)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:1711)
        at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1293)
        at Sanity.Restore(Sanity.java:138)
        at Sanity.main(Sanity.java:70)


CODE SNIPPET

String  filepath = "sys:\\restore\\data1.txt";
String query = "load data local infile  \'" + filepath + "\' into table
trail";

stmt.executeUpdate(query);

what could be wrong here ?
First, you do realize that 'load data local infile' means load the file that is on the client and send it to the server.

Second, Java is saying it can't open the file 'estoredata1.txt', which either means it doesn't exist at the path you say it does, or the permissions are wrong. Can you load this same file using the MySQL command-line client using the _exact_ same path?

-Mark


- -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+Slf+tvXNTca6JD8RAq+YAJ0bV2N62jOE7UsCOL2aOH4A7Y2MnACgiQRw
uLPb/oWgEJubdksxBafP6RU=
=uzys
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to