MySQL Forums
Forum List  »  Connector/JDBC and Java

How to use "load data local infile"statement from inputstream?
Posted by: zhou guxi
Date: April 21, 2010 09:04PM

Connector/J 5.1.3 and later include two additional methods:
• setLocalInfileInputStream() sets an InputStream instance that will be used to send data to the MySQL server for a LOAD DATA LOCAL INFILE statement rather than a FileInputStream or URLInputStream that represents the path given as an argument to the statement.

This stream will be read to completion upon execution of a LOAD DATA LOCAL INFILE statement, and will automatically be closed by the driver, so it needs to be reset before each call to execute*() that would cause the MySQL server to request data to fulfill the request for LOAD DATA LOCAL INFILE.

If this value is set to NULL, the driver will revert to using a FileInputStream or URLInputStream as required.

I don't know what LOAD DATA LOCAL INFILE followed by. I need a specific example of
"LOAD DATA LOCAL INFILE" statement used to get data from input stream.

Options: ReplyQuote

Written By
How to use "load data local infile"statement from inputstream?
April 21, 2010 09:04PM

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.