public long CountRegs(string table, string RetrieveDataCondition, BaseDbType dialect)
        {
            string sql = "select count(*) from " + dialect.FormatDbObj(table) + " " + RetrieveDataCondition;

            using (IDataReader dr = this.ExecuteDataReader(sql))
                if (dr.Read())
                {
                    return(Convert.ToInt64(dr.GetValue(0)));
                }
                else
                {
                    return(0);
                }
        }
Beispiel #2
0
 public SqlQueryBuilder From(string table)
 {
     query.Append(" from " + dialect.FormatDbObj(table) + " ");
     return(this);
 }