1. 首页
  2. 数据库
  3. 其它
  4. asp.net下降文本格式数据导入到数据库中的代码

asp.net下降文本格式数据导入到数据库中的代码

上传者: 2021-01-04 04:31:38上传 PDF文件 19.22KB 热度 11次
代码如下:StreamReader sr = new StreamReader(“E:\\123.txt”);//文件路径 string oneLine; while ((oneLine = sr.ReadLine()) != null) { string[] str = oneLine.Split(‘|’); string sql = “insert into TableDX(number,name,produce,xinghao) values(‘” + str[0].ToString() + “‘,'” + str[1].ToString().Replace(“‘”,”‘”) + “‘,
下载地址
用户评论