private void ImportSqlite(string sTarTable, DataTable dt) { try { var sErr = string.Empty; var nItems = SqliteHelper.BulkToDB(mConnectType.ConnStr, dt, sTarTable, out sErr); if (!string.IsNullOrEmpty(sErr)) { MessageBox.Show(sErr); } else { var str = string.Format("导入完成, {0}条记录", nItems); MessageBox.Show(str); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Import error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }