110,539
社区成员
发帖
与我相关
我的任务
分享
string constring = @"data source=C:\desnew.db";
SQLiteConnection con = new SQLiteConnection(constring);
con.Open();
SQLiteCommand cmd;
cmd = new SQLiteCommand(con);
for (int i = 1; i <= 191202; i++)
{
cmd.CommandText = "select * from descriptors limit 1 offset " + (i - 1);
SQLiteDataReader rd = cmd.ExecuteReader();
//....read data
var cmd1 = new SQLiteCommand(con);
cmd1.CommandText = "update descriptors set cas_no_hash='" + guid.ToString() + "' where mc_no='" + mc_no + "'";
cmd1.ExecuteNonQuery();
Console.WriteLine("第{0}条已更新-----{1}", i, mc_no);