LOAD DATA LOCAL INFILE MySQL Command
Posted by: Jeffery
Date: January 19, 2006 08:36AM

Has anyone had any luck using the "LOAD DATA LOCAL INFILE" command with MySQL++? I have the "Enable load data local infile" option enabled for the MySQL server. Is there something else that I have to do in order to get this command to work? The query string shown below executes without any problems when using MySQL Query Browser (Version 1.1.18).

LOAD DATA LOCAL INFILE 'c:\\a\\AZ_combined.dat' INTO TABLE stocks FIELDS TERMINATED BY ',';


However, when I try to use this very same command in Visual C++ 7.1 using MySQL++, the command doesn't execute, and error_code is set to "1".

error_code = mysql_query(pConnection,"LOAD DATA LOCAL INFILE \'c:\\a\\AZ_combined.dat\' INTO TABLE stocks FIELDS TERMINATED BY \',\'");


Is there something special that I have to do to get this particular command to work properly? Note that I have gotten other commands to work just fine in Visual Studio 7.1 using MySQl++. For instance:

error_code = mysql_query(pConnection,"CREATE TABLE stocks (ticker CHAR(7), date INT, open FLOAT(2) UNSIGNED, high FLOAT(2) UNSIGNED, low FLOAT(2) UNSIGNED, close FLOAT(2) UNSIGNED, volume FLOAT(2) UNSIGNED)");


This command worked in the same fashion that it did when using MySQL Query Browser. Can anyone offer any insight into what I'm doing wrong here? Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
LOAD DATA LOCAL INFILE MySQL Command
1719
January 19, 2006 08:36AM


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.