Hi,
i like to export Mysql table as a csv file. The below command working good in MySQL command prompt and file stored in D drive.
Code:
SELECT * FROM LOG INTO OUTFILE 'D:\\logreport.csv' FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY "\r\n";
I like to use this command via C++.
Code:
CString sQuery = "SELECT * FROM log INTO OUTFILE 'D:\\logreport.csv' FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY "\r\n"";
Getting missing closing quote Error. So tried like below,
Code:
sQuery = "SELECT * FROM log INTO OUTFILE 'D:\\logreport.csv'";
DB.ExecuteSQL(QueryStr);
DB.ExecuteSQL(FlushStr);
This query also not working. showing empty error message.