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!!!
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!!!