OraHelper OraHelper = new OraHelper();

        private void btnRead_Click(object sender, EventArgs e)
        {

          

            string[] strFiles = Directory.GetFiles(@"E:\网站\百联项目\goodshtml");
        
            string strProductid = string.Empty;
            string strSql = string.Empty;
            string output = string.Empty;

            foreach(string strFile in strFiles) 
            {
                strProductid = Path.GetFileName(strFile);

                strProductid = strProductid.Substring(0, strProductid.IndexOf("."));

                StreamReader sr = new StreamReader(strFile, System.Text.Encoding.Default);
                output = sr.ReadToEnd();
              

                //output=output.Replace(""
                strSql = "update web_goods set producthtml= :output where productid='"+strProductid+"'";
                OracleParameter[] ps=new OracleParameter[1];

                ps[0] = new OracleParameter();
                ps[0].ParameterName = ":output";
                ps[0].OracleType = OracleType.Clob;
                //ps[0].Size = 2000;
                ps[0].Value = output;
            
                OraHelper.ExecuteNonQuery(OraHelper.CONN_STRING,CommandType.Text,strSql,ps);


                 sr.Close();
         
              

            }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2021-06-23
  • 2021-08-02
  • 2021-09-01
  • 2021-06-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
相关资源
相似解决方案