作者:薇薇MM81_811 | 来源:互联网 | 2017-05-12 16:11
bitsCN.com
private void btnImport_Click(object sender, EventArgs e) { string filePath = textBox1.Text; string importPwd = txtPwd.Text; if (string.IsNullOrEmpty(filePath) || string.IsNullOrEmpty(importPwd)) { MessageBox.Show("请先导入文件,填写操作密码后,再操作!"); } else { btnImport.Text = "正在导入..."; btnImport.Enabled = false; string[] allLines = File.ReadAllLines(filePath); using (SQLiteConnection con = new SQLiteConnection(connStr)) { con.Open(); DbTransaction trans = con.BeginTransaction();//开始事务 SQLiteCommand cmd = new SQLiteCommand(con); try { for (int n = 0; n
bitsCN.com