byte[] byData = new byte[100];
char[] charData = new char[1000];
string path = "F:\\小说\\新建文本文档 (2).txt";
read(path);
private static void read(string path)//分读取2,读取所有字符
{
StreamReader sr = new StreamReader(path, Encoding.Default);
string line="";
int judge = 0;
while ((line = sr.ReadLine()) != null)
{
if (line == "")
{
continue;
}
Console.WriteLine(line.ToString());
string sql = string.Format("insert into data values('{0}')", line);
int r = DBhelp.ExecuteNonQuery(sql);
if (r > 0)
{
judge++;
}
}
if (judge > 0)
{
System.Windows.Forms.MessageBox.Show("添加成功", "添加成功消息");
}
}
把你表结构贴出来,什么叫卡了起来?????
表中一条语句,不是数据库问题,读取有数度,但在保存时,卡带了
算了,这个贴结了