Exemplo n.º 1
0
        /// <summary>
        /// Executes the query and fills the dataset
        /// </summary>
        /// <param name="sql">sql</param>
        /// <param name="param"></param>
        /// <returns>dataset</returns>
        public static DataSet ExecuteDataset(string sql, SqlParams[] param, Trx trx)
        {
            System.Data.SqlClient.SqlParameter[] param1 = GetSqlParameter(param);

            //Trx trx = trxName == null ? null : Trx.Get(trxName, true);
            if (trx != null)
            {
                return(trx.ExecuteDataset(sql, param1, trx));
            }
            else
            {
                return(VAdvantage.SqlExec.ExecuteQuery.ExecuteDataset(sql, param1));
            }
        }