Esempio n. 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));
        }
Esempio n. 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)));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }