Exemple #1
0
        public DataTable ExecuteDataTable(int startRecord, int maxRecords, string formatSql, params object[] paramValues)
        {
            string text = DbUtility.GetFormat(formatSql, paramValues);
            var    cmd  = this.PrepareCommand(text, CommandType.Text);

            return(this.ExecuteDataTable(cmd, startRecord, maxRecords));
        }
Exemple #2
0
        public T ExecuteScalar <T>(string formatSql, params object[] paramValues)
        {
            string text = DbUtility.GetFormat(formatSql, paramValues);
            var    cmd  = this.PrepareCommand(text, CommandType.Text);

            return((T)Convert.ChangeType(this.ExecuteScalar(cmd), typeof(T)));
        }
Exemple #3
0
        public DbDataReader ExecuteReader(string formatSql, params object[] paramValues)
        {
            string text = DbUtility.GetFormat(formatSql, paramValues);
            var    cmd  = this.PrepareCommand(text, CommandType.Text);

            return(this.ExecuteReader(cmd));
        }
Exemple #4
0
        public int ExecuteNonQuery(string formatSql, params object[] paramValues)
        {
            string text = DbUtility.GetFormat(formatSql, paramValues);
            var    cmd  = this.PrepareCommand(text, CommandType.Text);

            return(this.ExecuteNonQuery(cmd));
        }