c# - MySQLBulkLoader not inserting any row in mysql db -


   var bl = new mysqlbulkloader(mycon);             bl.tablename = "tblspmaster";             bl.fieldterminator = ",";             bl.lineterminator = "\r\n";             bl.filename = "e://31october//sp//sp_files_sample1//400k sp00 6-19 e.csv";             bl.numberoflinestoskip = 1;              var inserted = bl.load(); 

i using code upload csv file in db not throwing exception , inserted show 0 .

dotnetconnector mysql installed , reference added .

finally have used code , working me

string sql = @"load data infile 'e:/a1.csv' ignore table tblspmaster fields terminated '' enclosed '' lines terminated '\n' ignore 1 lines (sp)";  mysqlcommand cmd = new mysqlcommand(sql, mycon);  cmd.commandtimeout = 5000000;  cmd.executenonquery(); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -