Example #1
0
        /// <summary>
        /// ExecuteDataReader
        /// </summary>
        /// <param name="dbCommand"></param>
        /// <returns></returns>
        public static OracleDataReader ExecuteDataReader(OracleCommand dbCommand, OracleConnection oraConnection)
        {
            try
            {
                OracleConnection connection = oraConnection;

                dbCommand.Connection = connection;
                return(dbCommand.ExecuteReader());
            }
            catch (Exception exception)
            {
                LogAPI.LogToFile(LogFileType.EXCEPTION, "ExecuteDataReader: " + exception.Message);
            }
            return(null);
        }
Example #2
0
        /// <summary>
        /// ExecuteNonQuery
        /// </summary>
        /// <param name="dbCommand"></param>
        /// <returns></returns>
        public static int ExecuteNonQuery(OracleCommand dbCommand)
        {
            int iResult = -1;

            try
            {
                OracleConnection connection = ME24OracleConnection;
                dbCommand.Connection = connection;

                iResult = dbCommand.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                LogAPI.LogToFile(LogFileType.EXCEPTION, "ExecuteNonQuery: " + ex.Message);
            }
            return(iResult);
        }