public override bool HasNextEvent() { DateTime now = DateTime.Now; String cmdText = String.Format(@"Select TOP 1 row_id FROM {0} WHERE status = {1} AND fire_time < {2} ", TableName, QCDBClient.EscapeString(Status_Live), QCDBClient.EscapeString(now.ToString())); return(DB.ExecuteScalar(cmdText) != null); }