示例#1
0
        void Process()
        {
            var proc = new Diff.Processor();
            var src  = proc.Source;

            src.Server   = SrcServerTxt.Text.Trim();
            src.AuthType = GetDbAuthType(SrcAuthWinOpt);
            src.AuthUser = SrcUserTxt.Text.Trim();
            src.AuthPass = SrcPassTxt.Text.Trim();
            src.Name     = SrcDatabaseTxt.Text.Trim();
            src.Schema   = SrcSchemaTxt.Text.Trim();

            var dest = proc.Destination;

            dest.Server   = DestServerTxt.Text.Trim();
            dest.AuthType = GetDbAuthType(DestAuthWinOpt);
            dest.AuthUser = DestUserTxt.Text.Trim();
            dest.AuthPass = DestPassTxt.Text.Trim();
            dest.Name     = DestDatabaseTxt.Text.Trim();
            dest.Schema   = DestSchemaTxt.Text.Trim();

            proc.OutputFolder = _currentOutputFolder;

            var opt = proc.Options;

            opt.ColumnCompare    = OptColCompareChk.Checked;
            opt.StrictSchema     = OptStrictSchemaChk.Checked;
            opt.FastCompare      = OptFastCompareChk.Checked;
            opt.LargeObjectBytes = GetNullableInt(OptLargeObjBytesTxt);
            opt.ConnectTimeout   = GetNullableInt(OptConnectTimeoutTxt);
            opt.RetryCount       = GetNullableInt(OptRetryCountTxt);
            opt.RetryInterval    = GetNullableInt(OptRetryIntervalTxt);

            ProcessTables(proc);
        }
示例#2
0
        void ProcessTables(Diff.Processor proc)
        {
            var list = TablesTxt.Text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);

            foreach (var item in list)
            {
                if (Cancelled())
                {
                    return;
                }
                ExecPrint("Table " + item + " being processed...");
                ExecPrint();

                proc.TableName = item;
                proc.Execute();
                _currentReportFile = proc.ReportFile;

                ExecPrint(proc.StandardOutput);
                ExecPrint("Table " + item + " result: " + proc.ExitStatus);
                ExecPrintSectionEnd();
            }
        }
示例#3
0
        void Process()
        {
            var proc = new Diff.Processor();
            var src = proc.Source;
            src.Server = SrcServerTxt.Text.Trim();
            src.AuthType = GetDbAuthType(SrcAuthWinOpt);
            src.AuthUser = SrcUserTxt.Text.Trim();
            src.AuthPass = SrcPassTxt.Text.Trim();
            src.Name = SrcDatabaseTxt.Text.Trim();
            src.Schema = SrcSchemaTxt.Text.Trim();

            var dest = proc.Destination;
            dest.Server = DestServerTxt.Text.Trim();
            dest.AuthType = GetDbAuthType(DestAuthWinOpt);
            dest.AuthUser = DestUserTxt.Text.Trim();
            dest.AuthPass = DestPassTxt.Text.Trim();
            dest.Name = DestDatabaseTxt.Text.Trim();
            dest.Schema = DestSchemaTxt.Text.Trim();

            proc.OutputFolder = _currentOutputFolder;

            var opt = proc.Options;
            opt.ColumnCompare = OptColCompareChk.Checked;
            opt.StrictSchema = OptStrictSchemaChk.Checked;
            opt.FastCompare = OptFastCompareChk.Checked;
            opt.LargeObjectBytes = GetNullableInt(OptLargeObjBytesTxt);
            opt.ConnectTimeout = GetNullableInt(OptConnectTimeoutTxt);
            opt.RetryCount = GetNullableInt(OptRetryCountTxt);
            opt.RetryInterval = GetNullableInt(OptRetryIntervalTxt);

            ProcessTables(proc);
        }