Ejemplo n.º 1
0
 /// <summary>
 /// 返回查询集合
 /// </summary>
 /// <param name="commandText"></param>
 /// <param name="commandParameters"></param>
 /// <param name="commandType"></param>
 /// <param name="transaction"></param>
 /// <returns></returns>
 public DataSet ExecuteDataset(String commandText, IDataParameter[] commandParameters = null, CommandType commandType = CommandType.Text,
                               IDbTransaction transaction = null)
 {
     return(MSSQLDBServer.ExecuteDataset(ConnectString, commandText, commandParameters, commandType, transaction));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 返回受影响的行数
 /// </summary>
 /// <param name="commandText"></param>
 /// <param name="commandParameters"></param>
 /// <param name="commandType"></param>
 /// <param name="transaction"></param>
 /// <returns></returns>
 public Int32 ExecuteNonQuery(String commandText, IDataParameter[] commandParameters = null, CommandType commandType = CommandType.Text,
                              IDbTransaction transaction = null)
 {
     return(MSSQLDBServer.ExecuteNonQuery(ConnectString, commandText, commandParameters, commandType, transaction));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 带Out或Output的查询表
 /// </summary>
 /// <param name="commandText"></param>
 /// <param name="outParameters"></param>
 /// <param name="commandParameters"></param>
 /// <param name="commandType"></param>
 /// <param name="transaction"></param>
 /// <returns></returns>
 public DataTable ExecuteDatatable(String commandText, out Dictionary <String, Object> outParameters, IDataParameter[] commandParameters,
                                   CommandType commandType = CommandType.StoredProcedure, IDbTransaction transaction = null)
 {
     return(MSSQLDBServer.ExecuteDatatable(ConnectString, commandText, out outParameters, commandParameters, commandType, transaction));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 批量导入
 /// </summary>
 /// <param name="dataTable"></param>
 /// <param name="batchSize"></param>
 /// <param name="bulkCopyTimeout"></param>
 /// <param name="copyOptions"></param>
 /// <returns></returns>
 public Boolean ExecuteBulkCopy(DataTable dataTable, Int32 batchSize = 10000, Int32 bulkCopyTimeout = 60,
                                SqlBulkCopyOptions copyOptions       = SqlBulkCopyOptions.Default)
 {
     return(MSSQLDBServer.SQLBulkCopy(ConnectString, dataTable, batchSize, bulkCopyTimeout, copyOptions));
 }