Example #1
0
 public void Execute_Query(string com_str, int connId)
 {
     WorkerResult = new SqlWorkerQueryResult(com_str);
     WorkerResult.Start();
     try
     {
         com             = GetConnection(connId).CreateCommand();
         com.CommandText = com_str;
         int cnt = com.ExecuteNonQuery();
         WorkerResult.Success(cnt);
     }
     catch (Exception ex)
     {
         WorkerResult.Error(ex.Message);
     }
     WorkerResult.End();
 }
Example #2
0
 public void Execute_Query(string com_str, int connId, SQLiteParameter[] prm)
 {
     WorkerResult = new SqlWorkerQueryResult(com_str);
     WorkerResult.Start();
     try
     {
         com             = GetConnection(connId).CreateCommand();
         com.CommandText = com_str;
         for (int i = 0; i < prm.Length; i++)
         {
             com.Parameters.Add(prm[i]);
         }
         int cnt = com.ExecuteNonQuery();
         WorkerResult.Success(cnt);
     }
     catch (Exception ex)
     {
         WorkerResult.Error(ex.Message);
     }
     WorkerResult.End();
 }