コード例 #1
0
ファイル: SsisComponent.cs プロジェクト: mosamy/vulcan
        public void Flush()
        {
            try
            {
                _instance.AcquireConnections(null);
            }
            catch (System.Runtime.InteropServices.COMException e)
            {
                string strErr = _component.GetErrorDescription(e.ErrorCode);
                try
                {
                    string temp = _component.GetErrorDescription(e.ErrorCode).Replace("%1", "{0}").Replace("%2", "{1:X}");
                    strErr = string.Format(temp, _sourceConnection.ConnectionManager.Name, e.ErrorCode);
                }
                catch (Exception)
                {
                    strErr = _component.GetErrorDescription(e.ErrorCode);
                }
                MessageEngine.Global.Trace(Severity.Warning, strErr);
            }

            try
            {
                _instance.ReinitializeMetaData();
            }
            catch (System.Runtime.InteropServices.COMException e)
            {
                MessageEngine.Global.Trace(Severity.Warning, _component.GetErrorDescription(e.ErrorCode));
            }
            _instance.ReleaseConnections();
        }