int ISimpleAdapter.Fill(DataSet dataSet, int startRecord, int maxRecords, string srcTable) { TkDebug.AssertArgumentNull(dataSet, "dataSet", this); TkDebug.AssertArgumentNullOrEmpty(srcTable, "srcTable", this); return(DbUtil.FillDataSet(this, DataAdapter, dataSet, srcTable, startRecord, maxRecords)); }
public void Select(string tableName, string sql) { TkDebug.AssertArgumentNullOrEmpty(tableName, "tableName", this); TkDebug.AssertArgumentNullOrEmpty(sql, "sql", this); SqlBuilder.GetSelectCommandSql(this, sql); DbUtil.FillDataSet(this, DataAdapter, HostDataSet, tableName); }
public void SetListData(IListSqlContext context, ISimpleAdapter adapter, DataSet dataSet, int startRecord, int maxRecords, string srcTable) { TkDebug.AssertArgumentNull(adapter, "adapter", this); TkDebug.AssertArgumentNull(dataSet, "dataSet", this); TkDebug.AssertArgumentNullOrEmpty(srcTable, "srcTable", this); DbUtil.FillDataSet(adapter, dataSet, srcTable); }
protected virtual void SetListData(IListSqlContext context, ISimpleAdapter adapter, DataSet dataSet, int startRecord, int maxRecords, string srcTable) { TkDebug.AssertArgument(startRecord >= 0, "startRecord", string.Format( ObjectUtil.SysCulture, "参数startRecord不能为负数,现在的值为{0}", startRecord), this); TkDebug.AssertArgument(maxRecords >= 0, "number", string.Format(ObjectUtil.SysCulture, "参数maxRecords不能为负数,现在的值为{0}", maxRecords), this); DbUtil.FillDataSet(adapter, dataSet, srcTable, startRecord, maxRecords); }
public void Select(string tableName, string sql, params IDbDataParameter[] dbParams) { TkDebug.AssertArgumentNullOrEmpty(tableName, "tableName", this); TkDebug.AssertArgumentNullOrEmpty(sql, "sql", this); TkDebug.AssertEnumerableArgumentNull <IDbDataParameter>(dbParams, "dbParams", this); SqlBuilder.GetSelectCommandSql(this, sql); DbUtil.SetCommandParams(DataAdapter.SelectCommand, dbParams); DbUtil.FillDataSet(this, DataAdapter, HostDataSet, tableName); }
void ISqlProvider.SetListData(IListSqlContext context, ISimpleAdapter adapter, DataSet dataSet, int startRecord, int maxRecords, string srcTable) { TkDebug.AssertArgumentNull(adapter, "adapter", this); TkDebug.AssertArgumentNull(dataSet, "dataSet", this); TkDebug.AssertArgumentNullOrEmpty(srcTable, "srcTable", this); TkDebug.AssertArgument(startRecord >= 0, "startRecord", string.Format(ObjectUtil.SysCulture, "参数startRecord不能为负数,现在的值为{0}", startRecord), this); TkDebug.AssertArgument(maxRecords >= 0, "number", string.Format(ObjectUtil.SysCulture, "参数maxRecords不能为负数,现在的值为{0}", maxRecords), this); DbUtil.FillDataSet(adapter, dataSet, srcTable, startRecord, maxRecords); }
internal void InternalExecute(ISqlDataAdapter selector) { TkDebug.AssertArgumentNull(selector, "selector", this); CreateStoredProc(); TkDebug.Assert(fConnection.State == ConnectionState.Closed, string.Format(ObjectUtil.SysCulture, "存储过程{0}在填充模式下,数据库连接必须是关闭的,请检查数据库连接的状态", ProcName), this); selector.DataAdapter.SelectCommand = Command; DbUtil.FillDataSet(this, selector.DataAdapter, selector.DataSet, ProcName); SetOutputValues(); }
public void Select(string tableName, string sql, DbParameterList parameterList) { TkDebug.AssertArgumentNullOrEmpty(tableName, "tableName", this); TkDebug.AssertArgumentNullOrEmpty(sql, "sql", this); TkDebug.AssertArgumentNull(parameterList, "parameterList", this); SqlBuilder.GetSelectCommandSql(this, sql); if (!parameterList.IsEmpty) { DbUtil.SetCommandParams(DataAdapter.SelectCommand, parameterList.CreateParameters(Context)); } DbUtil.FillDataSet(this, DataAdapter, HostDataSet, tableName); }
protected override void SetListData(IListSqlContext context, ISimpleAdapter adapter, DataSet dataSet, int startRecord, int maxRecords, string srcTable) { TkDebug.AssertArgumentNull(context, "context", this); YukonListSqlContext sqlContext = context.Convert <YukonListSqlContext>(); if (sqlContext.UseTopSql) { base.SetListData(context, adapter, dataSet, startRecord, maxRecords, srcTable); } else { DbUtil.FillDataSet(adapter, dataSet, srcTable); } }
public void Execute(DataSet dataSet) { TkDebug.AssertArgumentNull(dataSet, "dataSet", this); CreateStoredProc(); TkDebug.Assert(fUseContext, string.Format(ObjectUtil.SysCulture, "存储过程{0}没有设置Context,只设置了DbConnection,这种模式不支持从数据库选取数据集", ProcName), this); TkDebug.Assert(fConnection.State == ConnectionState.Closed, string.Format(ObjectUtil.SysCulture, "存储过程{0}在填充模式下,数据库连接必须是关闭的,请检查数据库连接的状态", ProcName), this); if (fAdapter == null) { fAdapter = Context.CreateDataAdapter(); fAdapter.SelectCommand = Command; } DbUtil.FillDataSet(this, fAdapter, dataSet, ProcName); SetOutputValues(); }
protected void FillDataSet() { DbUtil.FillDataSet(this, fDataAdapter, HostDataSet, TableName); }