Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1447

Error load data infile (1 reply)

$
0
0
Hi all,

I am using "load data infile" from my c# program to load some files in a table of my db but i am having one problem.

i use my MySQLCommand to execute the command

"LOAD DATA LOCAL INFILE '?nameFile' INTO TABLE tbl1 LINES TERMINATED BY '\r\n' (@var1) SETfield1=replace(trim(SUBSTR(@var1,1,30)),' ',''), field2=trim(SUBSTR(@var1,31,14)), field3=trim(SUBSTR(@var1,45,14)), field4= (select Id from cyte where trim(desc)= trim(SUBSTR(@var1,59,26)));"

mysqlcom.Parameters.AddWithValue("?nameFile", filename);

mysqlcom.ExecuteNonQuery();

and mysql db connection have "Allow User Variables=True";

this is the shown error:
base {System.SystemException} = {"Fatal error encountered during command execution."}
ErrorCode = -2147467259

how can i solve this problem???

thx in advance!!!

Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>