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 ("Please import the file first, enter the operation password, and then operate again! ");} Else {btnImport. text = "importing... "; btnImport. enabled = false; string [] allLines = File. readAllLines (filePath); using (SQLiteConnection con = new SQLiteConnection (connStr) {con. open (); DbTransaction trans = con. beginTransaction (); // start the SQLiteCommand cmd = new SQLiteCommand (con); try {for (int n = 0; n <allLines. length; n ++) {cmd. commandText = "insert into imei (imei) values (@ imei)"; cmd. P Arameters. add (new SQLiteParameter ("@ imei", DbType. string); cmd. parameters ["@ imei"]. value = allLines [n]; cmd. executeNonQuery ();} trans. commit (); // submit the transaction MessageBox. show ("file imported successfully! ");} Catch (Exception ex) {trans. Rollback (); MessageBox. Show (" File Import error. Please check whether repeated import or other reasons! ") ;}Finally {btnImport. Text =" import "; btnImport. Enabled = true ;}}}}