Esempio n. 1
0
 internal void Parse(Command cmd)
 {
     if (SqlText.Length > 0)
     {
         cmd.Text.Append(" where ").Append(SqlText.ToString());
         for(int i =0;i<Parameters.Count;i++)
         {
             Command.Parameter p= Parameters[i];
        
             cmd.AddParameter(p);
         }
     }
 }
Esempio n. 2
0
        public DataSet ExecuteDataSet(Command cmd)
        {
            IDbCommand _execmd = cmd.CreateCommand(Driver);
            OnInitCommand(_execmd);
            IDataAdapter da = Driver.DataAdapter(_execmd);
            DataSet ds = new DataSet();
            da.Fill(ds);

            return ds;
        }
Esempio n. 3
0
        public object ExecuteScalar(Command cmd)
        {

            IDbCommand _execmd = cmd.CreateCommand(Driver);
            OnInitCommand(_execmd);
            return _execmd.ExecuteScalar();
        }
Esempio n. 4
0
 public IDataReader ExecuteReader(Command cmd)
 {
     IDbCommand _execmd = cmd.CreateCommand(Driver);
     OnInitCommand(_execmd);
     
     return _execmd.ExecuteReader();
 }
Esempio n. 5
0
 public int ExecuteNonQuery(Command cmd)
 {
     IDbCommand _execmd = cmd.CreateCommand(Driver);
     OnInitCommand(_execmd);
     return _execmd.ExecuteNonQuery();
 }
Esempio n. 6
0
 /// <summary>
 /// 获取当前线程的命令对象
 /// </summary>
 /// <returns>Command</returns>
 public static Command GetThreadCommand()
 {
     if (mThreadCommand == null)
         mThreadCommand = new Command("");
     mThreadCommand.Clean();
     return mThreadCommand;
 }