C# 将txt文本中的数据写进数据库为什么只能写入部分呢,文本大概有9w条数据

问题遇到的现象和发生背景

FileStream fs = new FileStream(ticdir, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
StreamReader read = new StreamReader(fs, Encoding.Default);

                string strReadline;
                int i = 0;
            while ((strReadline = read.ReadLine()) != null)
                {
                    i++;
                    if (i > 2)
                    {
                        var strs = strReadline.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                        string ProductionTime = strs[0];
                        string Productcode = strs[1];
                        string MaterialProperties = strs[2];
                        string Poductioncode = strs[3];
                        string Length = strs[4];
                        string Inkjetcontent = strs[5];
                        var a = Convert.ToDateTime(ProductionTime);
                        var list = re.LoadIQueryableAll(p => p.ProductionTime == a).ToList();
                        if (list.Count == 0)
                        {
                            using (MySqlConnection conn = new MySqlConnection(connStr))
                            {
                                conn.Open();

                                using (MySqlCommand cmd = conn.CreateCommand())
                                {
                                    //cmd.CommandText = "select account from t_ac_text where account = '" + strReadline.Text + "'";
                                    cmd.CommandText = "insert into t_ac_text(ProductionTime,Productcode,MaterialProperties,Poductioncode,Length,Inkjetcontent) values(@ProductionTime,@Productcode,@MaterialProperties,@Poductioncode,@Length,@Inkjetcontent)";
                                    cmd.Parameters.Clear();//清除上一次的参数
                                    cmd.Parameters.Add(new MySqlParameter("@ProductionTime", ProductionTime));
                                    cmd.Parameters.Add(new MySqlParameter("@Productcode", Productcode));
                                    cmd.Parameters.Add(new MySqlParameter("@MaterialProperties", MaterialProperties));
                                    cmd.Parameters.Add(new MySqlParameter("@Poductioncode", Poductioncode));
                                    cmd.Parameters.Add(new MySqlParameter("@Length", Length));
                                    cmd.Parameters.Add(new MySqlParameter("@Inkjetcontent", Inkjetcontent));
                                    cmd.ExecuteNonQuery();

                                }
                            }
                        }
                        else
                        {
                            continue;
                        }

                    }
问题相关代码,请勿粘贴截图
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果

这里加了判断,存在不符合判断的的记录吧

img


题主用个变量记录下进入if判断一共有多少条记录

img