## @file\r
# This file is used to create/update/query/erase table for ECC reports\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
# Import Modules\r
#\r
import Common.EdkLogger as EdkLogger\r
-import os, time\r
+import Common.LongFilePathOs as os, time\r
from Table import Table\r
from Common.String import ConvertToSqlString2\r
import EccToolError as EccToolError\r
import EccGlobalData as EccGlobalData\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
\r
## TableReport\r
#\r
where Enabled > -1 order by ErrorID, BelongsToItem""" % (self.Table)\r
return self.Exec(SqlCommand)\r
\r
+ ## Update table\r
+ #\r
+ def UpdateBelongsToItemByFile(self, ItemID=-1, File=""):\r
+ SqlCommand = """update Report set BelongsToItem=%s where BelongsToTable='File' and BelongsToItem=-2\r
+ and OtherMsg like '%%%s%%'""" % (ItemID, File)\r
+ return self.Exec(SqlCommand)\r
+\r
## Convert to CSV\r
#\r
# Get all enabled records from table report and save them to a .csv file\r
IsCorrected = Record[5]\r
SqlCommand = ''\r
if BelongsToTable == 'File':\r
- SqlCommand = """select 0, FullPath from %s where ID = %s\r
+ SqlCommand = """select 1, FullPath from %s where ID = %s\r
""" % (BelongsToTable, BelongsToItem)\r
else:\r
SqlCommand = """select A.StartLine, B.FullPath from %s as A, File as B\r