예제 #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));
        }
예제 #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)));
        }
예제 #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));
        }
예제 #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));
        }