示例#1
0
 /// <summary>
 /// <para>Executes the <paramref name="command"/> within a transaction and returns an <see cref="IDataReader"></see> through which the result can be read.
 /// It is the responsibility of the caller to close the connection and reader when finished.</para>
 /// </summary>
 /// <param name="command">
 /// <para>The command that contains the query to execute.</para>
 /// </param>
 /// <param name="transaction">
 /// <para>The <see cref="IDbTransaction"/> to execute the command within.</para>
 /// </param>
 /// <returns>
 /// <para>An <see cref="IDataReader"/> object.</para>
 /// </returns>
 /// <seealso cref="IDbCommand.ExecuteReader"/>
 public virtual IDataReader ExecuteReader(DBCommandWrapper command, IDbTransaction transaction)
 {
     PrepareCommand(command, transaction);
     return(DoExecuteReader(command.Command, CommandBehavior.Default));
 }
示例#2
0
 /// <summary>
 /// <para>Executes the <paramref name="command"/> within the given <paramref name="transaction" />, and returns the number of rows affected.</para>
 /// </summary>
 /// <param name="command">
 /// <para>The command that contains the query to execute.</para>
 /// </param>
 /// <param name="transaction">
 /// <para>The <see cref="IDbTransaction"/> to execute the command within.</para>
 /// </param>
 /// <seealso cref="IDbCommand.ExecuteScalar"/>
 public virtual void ExecuteNonQuery(DBCommandWrapper command, IDbTransaction transaction)
 {
     PrepareCommand(command, transaction);
     DoExecuteNonQuery(command);
 }
示例#3
0
 /// <summary>
 /// <para>Executes the <paramref name="command"/> within a <paramref name="transaction" />, and returns the first column of the first row in the resultset returned by the query. Extra columns or rows are ignored.</para>
 /// </summary>
 /// <param name="command">
 /// <para>The command that contains the query to execute.</para>
 /// </param>
 /// <param name="transaction">
 /// <para>The <see cref="IDbTransaction"/> to execute the command within.</para>
 /// </param>
 /// <returns>
 /// <para>The first column of the first row in the resultset.</para>
 /// </returns>
 /// <seealso cref="IDbCommand.ExecuteScalar"/>
 public virtual object ExecuteScalar(DBCommandWrapper command, IDbTransaction transaction)
 {
     PrepareCommand(command, transaction);
     return(DoExecuteScalar(command));
 }
示例#4
0
 /// <summary>
 /// <para>Load a <see cref="DataSet"/> from a <see cref="DBCommandWrapper"/> in  a transaction.</para>
 /// </summary>
 /// <param name="command">
 /// <para>The command to execute to fill the <see cref="DataSet"/>.</para>
 /// </param>
 /// <param name="dataSet">
 /// <para>The <see cref="DataSet"/> to fill.</para>
 /// </param>
 /// <param name="tableNames">
 /// <para>An array of table name mappings for the <see cref="DataSet"/>.</para>
 /// </param>
 /// <param name="transaction">
 /// <para>The <see cref="IDbTransaction"/> to execute the command in.</para>
 /// </param>
 public virtual void LoadDataSet(DBCommandWrapper command, DataSet dataSet, string[] tableNames, IDbTransaction transaction)
 {
     PrepareCommand(command, transaction);
     DoLoadDataSet(command, dataSet, tableNames);
 }
示例#5
0
 /// <summary>
 /// <para>Execute the <paramref name="command"/> within the given <paramref name="transaction" /> and add a new <see cref="DataTable"></see> to the existing <see cref="DataSet"></see></para>
 /// </summary>
 /// <param name="command">
 /// <para>The <see cref="DBCommandWrapper"/> to execute.</para>
 /// </param>
 /// <param name="dataSet">
 /// <para>The <see cref="DataSet"/> to load.</para>
 /// </param>
 /// <param name="tableName">
 /// <para>The name for the new <see cref="DataTable"/> to add to the <see cref="DataSet"/>.</para>
 /// </param>
 /// <param name="transaction">
 /// <para>The <see cref="IDbTransaction"/> to execute the command within.</para>
 /// </param>
 /// <seealso cref="DbDataAdapter.Fill"/>
 /// <exception cref="System.ArgumentNullException">Any input parameter was null</exception>
 /// <exception cref="System.ArgumentException">tableName was an empty string</exception>
 public virtual void LoadDataSet(DBCommandWrapper command, DataSet dataSet, string tableName, IDbTransaction transaction)
 {
     LoadDataSet(command, dataSet, new string[] { tableName }, transaction);
 }
示例#6
0
 /// <summary>
 /// <para>Execute the <paramref name="command"/> and add a new <see cref="DataTable"></see> to the existing <see cref="DataSet"></see></para>
 /// </summary>
 /// <param name="command">
 /// <para>The <see cref="DBCommandWrapper"/> to execute.</para>
 /// </param>
 /// <param name="dataSet">
 /// <para>The <see cref="DataSet"/> to load.</para>
 /// </param>
 /// <param name="tableName">
 /// <para>The name for the new <see cref="DataTable"/> to add to the <see cref="DataSet"/>.</para>
 /// </param>
 /// <seealso cref="DbDataAdapter.Fill"/>
 /// <exception cref="System.ArgumentNullException">Any input parameter was null</exception>
 /// <exception cref="System.ArgumentException">tableName was an empty string</exception>
 public virtual void LoadDataSet(DBCommandWrapper command, DataSet dataSet, string tableName)
 {
     LoadDataSet(command, dataSet, new string[] { tableName });
 }