From 81c46add6b31e0f347da357feaff7ebbdb6a2c36 Mon Sep 17 00:00:00 2001
From: dogchang70 <dogchang70@7fafa455-2d8e-8247-9248-17d0fe17a33f>
Date: Fri, 15 Jan 2016 09:52:09 +0800
Subject: [PATCH] CT-4 網站須可於Windows Server 2012 64位元版本平台使用。

---
 CCSTrace/CCS/CCSMain.cs |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/CCSTrace/CCS/CCSMain.cs b/CCSTrace/CCS/CCSMain.cs
index 52ccd19..56a0dbb 100644
--- a/CCSTrace/CCS/CCSMain.cs
+++ b/CCSTrace/CCS/CCSMain.cs
@@ -23,7 +23,8 @@
         public static System.Collections.ArrayList ProcessCases = new System.Collections.ArrayList();
 
         private string LoadFilename = "DBConfig.xml";
-        private string ConnectionString = "";
+        private string ConnectionString = String.Empty;
+        private string traceConnectionString = String.Empty;
         private int ConnectionCount = 1;
         public static System.Data.OracleClient.OracleConnection MainConn = null;
         static SEventLog _MainLog = null;
@@ -168,7 +169,8 @@
                             // Step 3: 讀取 FileInfo 標籤的屬性
                             if (LocalName.Equals("DBSetting"))
                             {
-                                ConnectionString = reader["ConnectionString"];
+                                ConnectionString = String.Format("Data source={0};User Id={1};Password={2};", reader["DataSource"], reader["UserId"], reader["Password"]) ;
+                                traceConnectionString = String.Format("{0}/{1}@{2}", reader["UserId"], reader["Password"], reader["DataSource"]);
                                 ConnectionCount = Int32.Parse(reader["ConnectionCount"]);
                                 LocalVariable.ShowError = bool.Parse(reader["ShowError"]);
                             }
@@ -283,19 +285,17 @@
                 if (_Conn.State.ToString().Equals("Closed"))
                     _Conn.Open();
 
-                ProcessEvent _ProcessEvent = new ProcessEvent(_Record,_Conn);
+                ProcessEvent _ProcessEvent = new ProcessEvent(_Record, _Conn, traceConnectionString);
                 _ProcessEvent.ThreadFinish += new ThreadEndEventHandler(ThreadEndEventProcess);
 
                 System.Threading.ThreadStart _ThreadStart = new System.Threading.ThreadStart(_ProcessEvent.Run);
                 System.Threading.Thread _Thread = new System.Threading.Thread(_ThreadStart);
                 _Thread.Start();
             }
-            catch (Exception e)
+            catch
             {
                 DBConnList.Add(_Conn);
             }
-
-
         }
 
         private void ThreadEndEventProcess(object sender, ThreadEndEvent e)
@@ -310,7 +310,7 @@
                 else
                     DBConnList.Add(e.getConnection());
             }
-            catch (Exception ex)
+            catch
             {
                 DBConnList.Add(e.getConnection());
             }
@@ -422,9 +422,6 @@
             {
                 _PLog = new RecordLog(CCS.LocalVariable.CCS_ListPath + "MAIN.txt");
                 _PLog.Error(message);
-            }
-            catch (Exception ex)
-            { 
             }
             finally
             {

--
Gitblit v0.0.0-SNAPSHOT