Quote Originally Posted by chenz View Post
You could look at mQuery.executedQuery() to see if the the query executed by QSqlQuery really matches the one you enter in the command window.
I print the 'executedQuery()',and find that it execute ""LOAD DATA INFILE '"+fileName+"' INTO TABLE table1 FIELDS TERMINATED BY ' ' LINES TERMINATED BY '\r\n'"))" ,that is, it exectue the query as I type.

Quote Originally Posted by chenz View Post
It could also be a transaction problem, maybe there is a COMMIT missing in your Qt code?
I have no transaction ,so there is no COMMIT.

By the way, if I exectue 'Insert' or 'update',it is ok.